[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 <Whenrow@users.noreply.github.com>
This commit is contained in:
William Henrotin
2020-10-23 12:26:15 +00:00
parent 562fdd67f2
commit ca782a540e
+1 -1
View File
@@ -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: