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

Compute Method: _compute_issued_shift_ids

View 17.0
Inputs Method Outputs
  • shift_ids
  • shift_ids.ids
  • issued_shift_ids
- for plan in self:
-             plan.issued_shift_ids = (
-                 self.env["hr.shift.planning.line"]
-                 .search(
-                     [
-                         ("shift_id", "in", plan.shift_ids.ids),
-                         ("state", "=", "on_leave"),
-                         ("reviewed", "=", False),
-                     ]
-                 )
-                 .shift_id
-             )
-             plan.issued_shifts_count = len(plan.issued_shift_ids)
  • issued_shift_ids
  • issued_shifts_count

Back to entity