[IMP]GOLEM Member default nationality and country

This commit is contained in:
Fabien Bourgeois 2016-07-08 19:27:01 +02:00
parent 6792e72fbc
commit 78021f62bd

View File

@ -21,10 +21,12 @@ from openerp import models, fields, api, _
class ResPartner(models.Model):
_inherit = 'res.partner'
@api.model
def _get_default_nationality_id(self):
return self.env.ref('base.main_company').country_id
nationality_id = fields.Many2one(default=_get_default_nationality_id)
country_id = fields.Many2one(default=_get_default_nationality_id)
# Gender overwriting : no need for 'other' choice
gender = fields.Selection([('male', _('Male')), ('female', _('Female'))])