[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:
Kevin Baptiste
2023-02-27 15:00:01 +01:00
parent b3be95860b
commit f4045d6004
+1
View File
@@ -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):