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_recurrency_until
| Inputs | Method | Outputs |
|---|---|---|
|
+ for attendance in self: + if not attendance.recurrency: + attendance.recurrency_until = attendance.date + continue + match attendance.recurrency_end_type: + case 'date' if attendance.recurrency_until == date.max: + attendance.recurrency_until = date.today() + case 'times' if attendance.date and attendance.recurrency_type and attendance.recurrency_interval and attendance.recurrency_count: + attendance.recurrency_until = attendance.date + timedelta(**{attendance.recurrency_type: attendance.recurrency_interval * (attendance.recurrency_count - 1)}) + case 'forever': + attendance.recurrency_until = date.max |
|
