forked from Yaltik/golem
[IMP]default for field inherited : no need to repeat extra data
This commit is contained in:
parent
c03f1122b5
commit
a8427703a9
@ -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')])
|
||||||
|
Loading…
Reference in New Issue
Block a user