Steps to reproduce the issue:
- have an employee with an allocation with an end date
- remove the employee's calendar
- go on his dashboard
- his remaining leaves amount is 0
This commit implements a new method on the resource mixin to fetch a calendar
for the record even though it might not have one. The default behaviour is
to fall back on the company's calendar to ensure a value.
This is overrided in the `hr_contract` module so that the calendar of the
contract is prioritized.
task-3609738
closesodoo/odoo#155753
X-original-commit: ff58269600da857e46f83d9be94049e3f8a84294
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>