[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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user