[VIEW] -taxes reference in account view
[burette/bikecoop_l10n_fr.git] / bikecoop.py
1 # -*- coding: utf-8 -*-
2 ##############################################################################
3 #
4 # Bikecoop_l10n_fr module for OpenERP, French specifities for bikecoop
5 # funtionnalities Copyright (C) 2012-2015 L'Heureux Cyclage
6 # (<http://www.heureux-cyclage.org>)
7 #
8 # This file is a part of Bikecoop_l10n_fr
9 #
10 # Bikecoop_l10n_fr is free software: you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation, either version 3 of the License, or
13 # (at your option) any later version.
14 #
15 # Bikecoop_l10n_fr is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #
23 ##############################################################################
24
25 from openerp.osv import osv
26 from openerp.osv import fields
27
28
29 class Partner(osv.osv):
30 _inherit = 'res.partner'
31
32 def _default_country(self, cr, uid, context=None):
33 if not context:
34 context = {}
35 country_obj = self.pool.get('res.country')
36 country = country_obj.search(cr, uid, [('name', '=', 'France')], context=context)
37 return country
38
39 def _default_nationality(self, cr, uid, context=None):
40 if not context:
41 context = {}
42 nationality_obj = self.pool.get('res.country')
43 nationality = nationality_obj.search(cr, uid, [('name', '=', 'France')], context=context)
44 return nationality
45
46 _defaults = {
47 'country_id': _default_country,
48 'nationality_id': _default_nationality,
49 }
50
51 Partner()
52 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: