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
| Inputs | Method | Outputs |
|---|---|---|
|
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']))
|
|
