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

Module: Attendances

Entity: hr.attendance

Compute Method: _compute_date

View 20.0
Inputs Method Outputs
  • employee_id
  • check_in
+ for attendance in self:
+             if not attendance.employee_id or not attendance.check_in:  # weird precompute edge cases. Never after creation
+                 attendance.date = datetime.today()
+                 continue
+             tz = ZoneInfo(attendance.employee_id._get_tz())
+             attendance.date = attendance.check_in.replace(tzinfo=UTC).astimezone(tz).date()
  • date

Back to entity