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

Module: Resource

Entity: resource.calendar

Compute Method: _compute_two_weeks_attendance

View 19.0
Inputs Method Outputs
  • two_weeks_calendar
  • attendance_ids
- for calendar in self:
-             if not calendar.two_weeks_calendar:
-                 continue
-             calendar.attendance_ids_1st_week = calendar.attendance_ids.filtered(lambda a: a.week_type == '0')
-             calendar.attendance_ids_2nd_week = calendar.attendance_ids.filtered(lambda a: a.week_type == '1')
  • attendance_ids_1st_week
  • attendance_ids_2nd_week

Back to entity