From ca782a540e5a1aceb6e5d41c20fd7d9d891a01cf Mon Sep 17 00:00:00 2001 From: William Henrotin Date: Fri, 23 Oct 2020 12:26:15 +0000 Subject: [PATCH] [FIX] mrp: change depends to trigger compute The _compute_is_planned() method was only triggered at the workorder creation and not at the modification of date_planned_start or date_planned_finished. This commit change the depends fields to trigger the compute at right time. closes odoo/odoo#60620 Signed-off-by: William Henrotin --- addons/mrp/models/mrp_production.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py index 66190c801e2..2a400705e1b 100644 --- a/addons/mrp/models/mrp_production.py +++ b/addons/mrp/models/mrp_production.py @@ -312,7 +312,7 @@ class MrpProduction(models.Model): for production in self: production.move_finished_ids.date_deadline = production.date_deadline - @api.depends("workorder_ids") + @api.depends("workorder_ids.date_planned_start", "workorder_ids.date_planned_finished") def _compute_is_planned(self): for production in self: if production.workorder_ids: