Step to reproduce:
- Create an accrual plan with the option "at the end of the year,
unused accruals will be lost" and that can be allocated every year
(in this example, 3 days)
- Create an allocation for Marc Demo based on that accrual plan
and starting in 2020.
- Run scheduled action
"Accrual Time Off: updates the number of time off"
- Connect as Marc Demo
Current behaviour:
- Marc Demo has receive a 6 day allocation
- While loop over the elapsed period doesn't take lost time into account
Behaviour after PR:
- Marc Demo receive 3 day allocation
opw-2769066
closesodoo/odoo#86369
X-original-commit: fc18355158b6724aeb3f900cae50cdab3e6d707b
Signed-off-by: Kevin Baptiste <kba@odoo.com>