[IMP]default for field inherited : no need to repeat extra data

This commit is contained in:
Fabien Bourgeois 2016-06-27 22:21:19 +02:00
parent c03f1122b5
commit a8427703a9

View File

@ -24,8 +24,7 @@ class ResPartner(models.Model):
def _get_default_nationality_id(self): def _get_default_nationality_id(self):
return self.env.ref('base.main_company').country_id return self.env.ref('base.main_company').country_id
nationality_id = fields.Many2one('res.country', 'Nationality', nationality_id = fields.Many2one(default=_get_default_nationality_id)
default=_get_default_nationality_id)
# Gender overwriting : no need for 'other' choice # Gender overwriting : no need for 'other' choice
gender = fields.Selection([('male', 'Male'), ('female', 'Female')]) gender = fields.Selection([('male', 'Male'), ('female', 'Female')])