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_days_data

View 17.0
Inputs Method Outputs
  • start_date
  • end_date
  • id
- """Used in the Kanban view"""
- self.days_data = {}
- for plan in self.filtered(lambda x: x.start_date and x.end_date):
-             dates = self.env["hr.shift.template"]._explode_date_range(
-                 plan.start_date, plan.end_date
-             )
-             plan.days_data = {
-                 date["weekday"]: {
-                     "weekday": dict(WEEK_DAYS_SELECTION).get(str(date["weekday"])),
-                     "weekday_number": str(date["weekday"]),
-                     "plan": plan.id,
-                     "day": date["date"].day,
-                 }
-                 for date in dates
-             }
  • days_data

Back to entity