diff --git a/addons/mrp/models/mrp_workorder.py b/addons/mrp/models/mrp_workorder.py index d9e89060c5c..96cb3fd5d3e 100644 --- a/addons/mrp/models/mrp_workorder.py +++ b/addons/mrp/models/mrp_workorder.py @@ -221,8 +221,9 @@ class MrpWorkorder(models.Model): def _set_qty_producing(self): for workorder in self: - workorder.production_id.qty_producing = workorder.qty_producing - workorder.production_id._set_qty_producing() + if workorder.qty_producing != 0 and workorder.production_id.qty_producing != workorder.qty_producing: + workorder.production_id.qty_producing = workorder.qty_producing + workorder.production_id._set_qty_producing() # Both `date_planned_start` and `date_planned_finished` are related fields on `leave_id`. Let's say # we slide a workorder on a gantt view, a single call to write is made with both