diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py index 23f7c1828..33ca19c9f 100644 --- a/yuthon_holiday/models/inherit_hr_leave.py +++ b/yuthon_holiday/models/inherit_hr_leave.py @@ -564,7 +564,7 @@ class HolidaysRequestBatch(models.Model): ) ], limit=1) - self.env['vacation.other.line'].create({ + self.env['vacation.other.line'].sudo().create({ 'vacation_id': vacation_report.id if vacation_report else False, 'holiday_type': leave_data['type_id'].id, 'employee_id': self.users_id.employee_id.id,