-
-
Notifications
You must be signed in to change notification settings - Fork 144
Open
Description
Seems that hr_holiday logic has changed
2025-11-22 23:48:17,220 337 ERROR odoo odoo.addons.hr_holidays_leave_auto_approve.tests.test_hr_holidays_leave_auto_approve: ERROR: TestHolidaysAutoValidate.test_leave_requests_state
Traceback (most recent call last):
File "/__w/hr-holidays/hr-holidays/hr_holidays_leave_auto_approve/tests/test_hr_holidays_leave_auto_approve.py", line 70, in test_leave_requests_state
leave1 = self.leave_request_model.create(
File "<decorator-gen-318>", line 2, in create
File "/opt/odoo/odoo/api.py", line 430, in _model_create_multi
return create(self, [arg])
File "/__w/hr-holidays/hr-holidays/hr_holidays_leave_auto_approve/models/hr_leave.py", line 38, in create
res._apply_auto_approve_policy()
File "/__w/hr-holidays/hr-holidays/hr_holidays_leave_auto_approve/models/hr_leave.py", line 21, in _apply_auto_approve_policy
self.filtered(lambda r: r._should_auto_approve()).sudo().action_approve()
File "/opt/odoo/addons/hr_holidays/models/hr_leave.py", line 1253, in action_approve
self.filtered(lambda hol: not hol.validation_type == 'both').action_validate()
File "/opt/odoo/addons/hr_holidays/models/hr_leave.py", line 1277, in action_validate
raise ValidationError(_('The following employees are not supposed to work during that period:\n %s') % ','.join(leaves.mapped('employee_id.name')))
odoo.exceptions.ValidationError: The following employees are not supposed to work during that period:
Test Employee
Metadata
Metadata
Assignees
Labels
No labels