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

Module: Maintenance

Entity: maintenance.mixin

Compute Method: _compute_maintenance_count

View 19.0 View 20.0
Inputs Method Outputs
  • maintenance_ids
for record in self:
            record.maintenance_count = len(record.maintenance_ids)
-             record.maintenance_open_count = len(record.maintenance_ids.filtered(lambda mr: not mr.stage_id.done and not mr.archive))
+             record.maintenance_open_count = len(record.maintenance_ids.filtered(lambda mr: mr.state not in ['done', 'cancelled']))
  • maintenance_count
  • maintenance_open_count

Back to entity