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_hours_per_day
| Inputs | Method | Outputs |
|---|---|---|
|
|
- for calendar in self: - attendances = calendar._get_global_attendances() - calendar.hours_per_day = calendar._get_hours_per_day(attendances) + """ Compute the average hours per day. + Cannot directly depend on hours_per_week because of rounding issues. """ + for calendar in self.filtered(lambda c: not c.flexible_hours): + calendar.hours_per_day = float_round(calendar._get_hours_per_day(), precision_digits=2) |
|
