odoo / odoo

Odoo. Open Source Apps To Grow Your Business.

Home Page:https://www.odoo.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Time Off cronjob error when employees have different working hours

m-melis opened this issue · comments

When employees are set to different working hours the time off cronjob is failing with ValueError: Expected singleton: resource.calendar(1, 2).

I think the source of the problem is here, where self.employee_id instead of allocation.employee_id

https://github.com/odoo/odoo/blob/17.0/addons/hr_holidays/models/hr_leave_allocation.py#L466

Odoo version 17.0-20240312

Hello @m-melis
Thanks for reporting. The bug is now fixed.
Cheers