From 3ea8fab10473ec35167fc26a8e9b5b64335f43d4 Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Wed, 12 Feb 2025 15:04:39 +0100 Subject: [PATCH] [FIX] odex_mobile: remove instruction that makes an attachment public --- .../odex_mobile/controllers/rest_api_v2/content_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/content_common.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/content_common.py index e7dd89350..af9cc3df9 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/content_common.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/content_common.py @@ -27,7 +27,7 @@ class MyController(http.Controller): # Access the binary content of the attachment if model == 'ir.attachment': attachment = request.env['ir.attachment'].sudo().browse(int(id)) - attachment.public = True + # attachment.public = True status, headers, content = request.env['ir.http'].sudo().binary_content( xmlid=xmlid, model=model, id=id, field=field, unique=unique, filename=filename, filename_field=filename_field, download=download, mimetype=mimetype, access_token=access_token)