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
parent
commit
88db74c4c3
No known key found for this signature in database GPG Key ID: 7DDBA4BA81B934CF
  1. 2
      partner_firstname/__openerp__.py
  2. 9
      partner_firstname/models/base_config_settings.py

2
partner_firstname/__openerp__.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)",

9
partner_firstname/models/base_config_settings.py

@ -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):

Loading…
Cancel
Save