Browse Source

Merge pull request #381 from LasLabs/bugfix/8.0/partner_firstname-order_change_compute

[8.0][FIX][partner_firstname] Fix names_order_changed computation
pull/298/head
Rafael Blasco 8 years ago
committed by GitHub
parent
commit
a957f7e9f3
  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, "
"ACSONE SA/NV, "

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