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_remaining_time

View 20.0
Inputs Method Outputs
  • state
  • duration_expected
  • duration
+ for workorder in self:
+             if workorder.state in ('done', 'cancel'):
+                 workorder.remaining_time = 0.0
+             else:
+                 workorder.remaining_time = workorder.duration_expected - workorder.duration
  • remaining_time

Back to entity