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

Module: Work Entries

Entity: hr.time.rule

Compute Method: _compute_quantity_period

View 20.0
Inputs Method Outputs
  • working_hours_mode
+ for rule in self:
+             mode = rule.working_hours_mode
+             if mode in ('schedule_day', 'day'):
+                 rule.quantity_period = 'day'
+             elif mode in ('schedule_week', 'week'):
+                 rule.quantity_period = 'week'
+             else:
+                 rule.quantity_period = False
  • quantity_period

Back to entity