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_template_id

View 17.0
Inputs Method Outputs
  • state
  • shift_id
  • shift_id.template_id
- for line in self:
-             if line.state in {"assigned", "unassigned"}:
-                 line.template_id = line.shift_id.template_id
-             if line.state in {"holiday", "on_leave"}:
-                 line.template_id = False
  • template_id

Back to entity