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

Module: Employees Shifts

Entity: hr.shift.planning.line

Compute Method: _compute_state

View 17.0
Inputs Method Outputs
  • template_id
- for shift in self:
-             if shift._is_public_holiday():
-                 shift.state = "holiday"
-             elif shift._is_on_leave():
-                 shift.state = "on_leave"
-             elif shift.template_id:
-                 shift.state = "assigned"
-             else:
-                 shift.state = "unassigned"
  • state

Back to entity