This commit is contained in:
odex 2024-07-17 13:29:46 +03:00
parent e81d1d68e9
commit 11b7e25544
6 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -9,3 +9,4 @@ from . import permission
from . import pettie
from . import project_timesheet
from . import employee_other_request
from . import content_common

View File

@ -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

View File

@ -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

View File

@ -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