From 16e9b57155c33e46b4a9e5e607128379fa8bf756 Mon Sep 17 00:00:00 2001 From: David Alonso Date: Sat, 15 Feb 2020 15:19:00 +0000 Subject: [PATCH] [FIX] maintenance: wrong self reference in _compute_next_maintenance method closes odoo/odoo#51434 X-original-commit: 1acfb8d8562b52eb95539ae9dbf11f122ee23ac0 Signed-off-by: Yannick Tivisse (yti) --- addons/maintenance/models/maintenance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/maintenance/models/maintenance.py b/addons/maintenance/models/maintenance.py index ae96a3e6cf6..49d27a2b182 100644 --- a/addons/maintenance/models/maintenance.py +++ b/addons/maintenance/models/maintenance.py @@ -176,7 +176,7 @@ class MaintenanceEquipment(models.Model): if next_date < date_now: next_date = date_now else: - next_date = self.effective_date + timedelta(days=equipment.period) + next_date = equipment.effective_date + timedelta(days=equipment.period) equipment.next_action_date = next_date (self - equipments).next_action_date = False