diff --git a/yuthon_property/models/property_meter_archives.py b/yuthon_property/models/property_meter_archives.py index a426a5c0c..e5dea749c 100644 --- a/yuthon_property/models/property_meter_archives.py +++ b/yuthon_property/models/property_meter_archives.py @@ -254,8 +254,8 @@ class MeterArchivesLine(models.Model): else: record.current_meter = 0 - @api.constrains('line_loss', 'current_meter', 'unit') - def _constrains_receivables(self): + @api.onchange('line_loss', 'current_meter', 'unit') + def onchange_receivables(self): for record in self: if record.line_loss and record.current_meter and record.unit: raw_value = record.current_meter * record.unit * (1 + record.line_loss) * record.gauge_magnification