From 1d731161f924016c559836a8d4c86981a9a5ff06 Mon Sep 17 00:00:00 2001 From: odex Date: Thu, 11 Jul 2024 18:26:02 +0300 Subject: [PATCH] fix some bug --- odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)