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

Module: Time Off

Entity: hr.leave.accrual.plan

Compute Method: _compute_carryover_day

Inputs Method Outputs
for plan in self:
            # 2020 is a leap year, so monthrange(2020, february) will return [2, 29]
            plan.carryover_day = str(min(monthrange(2020, int(plan.carryover_month))[1], int(plan.carryover_day)))

Back to entity