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

Module: Route Planning

Entity: route.route

Compute Method: _compute_state

Inputs Method Outputs
for record in self:
            if not record.checkpoint_ids:
                record.state = "draft"
            elif all(cp.state in ["done", "incident"] for cp in record.checkpoint_ids):
                record.state = "done"
            elif any(cp.state in ["done", "incident"] for cp in record.checkpoint_ids):
                record.state = "in_progress"
            elif any(cp.state == "planned" for cp in record.checkpoint_ids):
                record.state = "planned"
            else:
                record.state = "draft"

Back to entity