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.attendance

Compute Method: _compute_dayofweek

View 19.0 View 20.0
Inputs Method Outputs
  • date
  • dayofweek
+ for attendance in self:
+             if attendance.date:
+                 attendance.dayofweek = str(attendance.date.weekday())
+             elif not attendance.dayofweek:  # default value
+                 attendance.dayofweek = '0'
  • dayofweek

Back to entity