From 11b7e255444dd0aebaee48467bf622aa552ae659 Mon Sep 17 00:00:00 2001 From: odex Date: Wed, 17 Jul 2024 13:29:46 +0300 Subject: [PATCH] fix file --- odex25_mobile/odex_mobile/controllers/leave.py | 2 +- odex25_mobile/odex_mobile/controllers/permission.py | 2 +- odex25_mobile/odex_mobile/controllers/rest_api_v2/__init__.py | 1 + odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py | 2 +- .../odex_mobile/controllers/rest_api_v2/permission.py | 2 +- odex25_mobile/odex_mobile/models/hr_firebase_notification.py | 4 ++-- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/odex25_mobile/odex_mobile/controllers/leave.py b/odex25_mobile/odex_mobile/controllers/leave.py index 1b1d7d80d..fc6d2b1ab 100644 --- a/odex25_mobile/odex_mobile/controllers/leave.py +++ b/odex25_mobile/odex_mobile/controllers/leave.py @@ -279,7 +279,7 @@ class LeaveController(http.Controller): if attachment: url_base = http.request.env['ir.config_parameter'].sudo().get_param('web.base.url') for att in attachment: - url = url_base + "/web/content/%s" % (att.id) + url = url_base + "/api/content/%s" % (att.id) li.append(url) return li diff --git a/odex25_mobile/odex_mobile/controllers/permission.py b/odex25_mobile/odex_mobile/controllers/permission.py index 2fc7d29d0..bebd178b2 100644 --- a/odex25_mobile/odex_mobile/controllers/permission.py +++ b/odex25_mobile/odex_mobile/controllers/permission.py @@ -188,7 +188,7 @@ class PermissionController(http.Controller): url_base = http.request.env['ir.config_parameter'].sudo( ).get_param('web.base.url') for att in attachment: - url = url_base + "/web/content/%s" % (att.id) + url = url_base + "/api/content/%s" % (att.id) li.append(url) return li diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/__init__.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/__init__.py index c008ec026..6275b11f9 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/__init__.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/__init__.py @@ -9,3 +9,4 @@ from . import permission from . import pettie from . import project_timesheet from . import employee_other_request +from . import content_common 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 972b628f2..4001679cd 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py @@ -30,7 +30,7 @@ class LeaveController(http.Controller): url_base = http.request.env['ir.config_parameter'].sudo( ).get_param('web.base.url') for att in attachment: - url = url_base + "/web/content/%s" % (att.id) + url = url_base + "/api/content/%s" % (att.id) li.append(url) return li diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/permission.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/permission.py index 717eb039d..48137b684 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/permission.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/permission.py @@ -403,6 +403,6 @@ class PermissionController(http.Controller): if attachment: url_base = http.request.env['ir.config_parameter'].sudo().get_param('web.base.url') for att in attachment: - url = url_base + "/web/content/%s" % (att.id) + url = url_base + "/api/content/%s" % (att.id) li.append(url) return li diff --git a/odex25_mobile/odex_mobile/models/hr_firebase_notification.py b/odex25_mobile/odex_mobile/models/hr_firebase_notification.py index 94ee1ba40..9a9ca7a82 100644 --- a/odex25_mobile/odex_mobile/models/hr_firebase_notification.py +++ b/odex25_mobile/odex_mobile/models/hr_firebase_notification.py @@ -112,7 +112,7 @@ class HrHolidays(models.Model): if attachment: url_base = self.env['ir.config_parameter'].sudo().get_param('web.base.url') for att in attachment: - url = url_base + "/web/content/%s" % (att.id) + url = url_base + "/api/content/%s" % (att.id) li.append(url) return li @@ -200,7 +200,7 @@ class HrPersonalPermission(models.Model): if attachment: url_base = self.env['ir.config_parameter'].sudo().get_param('web.base.url') for att in attachment: - url = url_base + "/web/content/%s" % (att.id) + url = url_base + "/api/content/%s" % (att.id) li.append(url) return li