[IMP] hr_contract: contract wage field as ensure_one
The method `get_contract_wage_field()` was always called with a single contract record, and from a functional point of view, it doesn't make sense to call it on 2 records from different countries anyway. task-2801710 closes odoo/odoo#113731 Related: odoo/enterprise#26373 Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
@@ -224,6 +224,7 @@ class Contract(models.Model):
|
||||
return self[self._get_contract_wage_field()]
|
||||
|
||||
def _get_contract_wage_field(self):
|
||||
self.ensure_one()
|
||||
return 'wage'
|
||||
|
||||
def write(self, vals):
|
||||
|
||||
Reference in New Issue
Block a user