Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Manufacturing

Entity: mrp.workorder

Compute Method: _compute_duration_expected

View 19.0 View 20.0
Inputs Method Outputs
  • state
  • qty_producing
  • qty_production
for workorder in self:
-             # Recompute the duration expected if the qty_producing has been changed:
-             # compare with the origin record if it happens during an onchange
-             if workorder.state not in ['done', 'cancel'] and (workorder.qty_producing != workorder.qty_production
-                 or (workorder._origin != workorder and workorder._origin.qty_producing and workorder.qty_producing != workorder._origin.qty_producing)):
+             if workorder.state not in ['done', 'cancel']:
                workorder.duration_expected = workorder._get_duration_expected()
  • duration_expected

Back to entity