Browse Source
[FIX] partner_firstname: Fix names_order_changed computation
* Fix assignment, singleton issue, and missing depends in `names_order_changed`
pull/381/head
Dave Lasley
8 years ago
No known key found for this signature in database
GPG Key ID: 7DDBA4BA81B934CF
2 changed files with
8 additions and
3 deletions
-
partner_firstname/__openerp__.py
-
partner_firstname/models/base_config_settings.py
|
|
@ -21,7 +21,7 @@ |
|
|
|
{ |
|
|
|
'name': 'Partner first name and last name', |
|
|
|
'summary': "Split first name and last name for non company partners", |
|
|
|
'version': '8.0.2.2.0', |
|
|
|
'version': '8.0.2.2.1', |
|
|
|
"author": "Camptocamp, " |
|
|
|
"Grupo ESOC Ingeniería de Servicios, " |
|
|
|
"Odoo Community Association (OCA)", |
|
|
|
|
|
@ -36,10 +36,15 @@ class BaseConfigSettings(models.TransientModel): |
|
|
|
} |
|
|
|
|
|
|
|
@api.multi |
|
|
|
@api.depends('partner_names_order') |
|
|
|
def _compute_names_order_changed(self): |
|
|
|
current = self.env['ir.config_parameter'].get_param( |
|
|
|
'partner_names_order', self._partner_names_order_default()) |
|
|
|
return self.partner_names_order != current |
|
|
|
'partner_names_order', self._partner_names_order_default(), |
|
|
|
) |
|
|
|
for record in self: |
|
|
|
record.partner_names_order_changed = bool( |
|
|
|
record.partner_names_order != current |
|
|
|
) |
|
|
|
|
|
|
|
@api.onchange('partner_names_order') |
|
|
|
def _onchange_partner_names_order(self): |
|
|
|