diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py index 1fbdee646..af108c8ed 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py @@ -173,7 +173,8 @@ class LeaveController(http.Controller): success=False) data = None try: - holidays = http.request.env['hr.holidays'].search([('id', '=', id)]) + holidays = http.request.env['hr.holidays'].sudo().search([('id', '=', id)]) + print(holidays) if holidays: data = self.get_return_data(holidays)