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.production

Compute Method: _compute_is_planned

View 19.0 View 20.0
Inputs Method Outputs
  • workorder_ids
for production in self:
            if production.workorder_ids:
-                 production.is_planned = any(wo.date_start and wo.date_finished for wo in production.workorder_ids)
+                 production.is_planned = all(wo.is_planned for wo in production.workorder_ids if wo.state != 'cancel')
            else:
                production.is_planned = False
  • is_planned

Back to entity