summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-23 13:37:05 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-23 13:37:05 +0700
commitabcaa5e5a67a91356932136fe31996d84f8fa853 (patch)
tree5fc81b5512e5030f95482da17c5b4dab7f4709a8 /addons
parent3751379f1e9a4c215fb6eb898b4ccc67659b9ace (diff)
always public if add image in web editor
Diffstat (limited to 'addons')
-rw-r--r--addons/web_editor/controllers/main.py8
1 files changed, 6 insertions, 2 deletions
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,
}