[FIX] project_timesheet_holidays: fix generation of timesheets for public holidays
Steps: - Open Time-Off - Go to configuration - In public Holidays - Create a new public holidays Issue: - The validation error occurs. Cause: - It get employee from the company which is not selected due to this employee consider as a invalid employee. Fix: - Add domain in employees_groups so it consider only selected companies employee while creating public holiday. Task: 3504636 closes odoo/odoo#140185 X-original-commit: fe88f384d186cf4e3e5505dde78d68e286c34a0e Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
@@ -96,7 +96,7 @@ class ResourceCalendarLeaves(models.Model):
|
||||
resource_calendars = self._get_resource_calendars()
|
||||
work_hours_data = self._work_time_per_day(resource_calendars)
|
||||
employees_groups = self.env['hr.employee']._read_group(
|
||||
[('resource_calendar_id', 'in', resource_calendars.ids)],
|
||||
[('resource_calendar_id', 'in', resource_calendars.ids), ('company_id', 'in', self.env.companies.ids)],
|
||||
['resource_calendar_id'],
|
||||
['id:recordset'])
|
||||
mapped_employee = {
|
||||
|
||||
Reference in New Issue
Block a user