添加功能

This commit is contained in:
李鹏宇
2025-10-16 10:57:17 +08:00
parent a4d880e459
commit b91faf0d4b
2 changed files with 2 additions and 2 deletions
@@ -281,7 +281,7 @@ class MeterArchivesLine(models.Model):
@api.depends('last_read', 'current_read')
def _compute_current_meter(self):
for record in self:
if record.current_read > record.last_read:
if record.current_read >= record.last_read:
record.current_meter = record.current_read - record.last_read
else:
if record.maximum_count > 0:
@@ -218,7 +218,7 @@ class MeterWaterLine(models.Model):
@api.depends('last_read', 'current_read')
def _compute_current_meter(self):
for record in self:
if record.current_read > record.last_read:
if record.current_read >= record.last_read:
record.current_meter = record.current_read - record.last_read
else:
if record.maximum_count > 0: