From abcaa5e5a67a91356932136fe31996d84f8fa853 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Mon, 23 May 2022 13:37:05 +0700 Subject: always public if add image in web editor --- addons/web_editor/controllers/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'addons') diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py index 2cefa652..5f45bf3c 100644 --- a/addons/web_editor/controllers/main.py +++ b/addons/web_editor/controllers/main.py @@ -253,10 +253,14 @@ class Web_Editor(http.Controller): res_id = int(res_id) else: res_id = False - + #always public if add image in web editor (which is email marketing) @Stephan + custom_public = False + if res_model == 'model' or res_model == 'ir.ui.view': + custom_public = True attachment_data = { 'name': name, - 'public': res_model == 'ir.ui.view', + #'public': res_model == 'ir.ui.view', + 'public': custom_public, 'res_id': res_id, 'res_model': res_model, } -- cgit v1.2.3