summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Degueldre <sad@odoo.com>2020-02-13 10:38:25 +0000
committerSamuel Degueldre <sad@odoo.com>2020-02-13 10:38:25 +0000
commitc305f89e51cd5d650b28c19664b9bef3aa13ae52 (patch)
tree9779460d6547cbabd086e6f92edc35b5f7c5e415
parent9621369e059bfc149160e6f269d83c754010b12a (diff)
[FIX] web_editor: fix summernote files showing up in media dialog
Due to the infamous web_editor revert, summernote assets filesa are once again created and stored in DB, but because they do not contain 'assets_' in their name, they would show up in the media dialog. This commit fixes that by prefixing the created summernote assets file with 'assets_' closes odoo/odoo#45298 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
-rw-r--r--addons/web_editor/views/editor.xml4
-rw-r--r--addons/website/tests/test_views.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/addons/web_editor/views/editor.xml b/addons/web_editor/views/editor.xml
index 4633315fd72..eee7c1fafd3 100644
--- a/addons/web_editor/views/editor.xml
+++ b/addons/web_editor/views/editor.xml
@@ -14,7 +14,7 @@
<template id="assets_wysiwyg" name="Wysiwyg Editor Assets">
<!-- lib -->
- <t t-call-assets="web_editor.summernote"/>
+ <t t-call-assets="web_editor.assets_summernote"/>
<link rel="stylesheet" type="text/css" href="/web_editor/static/lib/cropperjs/cropper.css"/>
<script type="text/javascript" src="/web_editor/static/lib/cropperjs/cropper.js"/>
@@ -62,7 +62,7 @@
<script type="text/javascript" src="/web_editor/static/src/js/wysiwyg/wysiwyg_iframe.js"/>
</template>
-<template id="summernote" name="Summernote">
+<template id="assets_summernote" name="Summernote">
<script type="text/javascript">
(function () {
"use strict";
diff --git a/addons/website/tests/test_views.py b/addons/website/tests/test_views.py
index d99e3c84e16..3b43f058d68 100644
--- a/addons/website/tests/test_views.py
+++ b/addons/website/tests/test_views.py
@@ -831,7 +831,7 @@ class TestCowViewSaving(common.TransactionCase):
'name': 'Main layout',
'mode': 'extension',
'inherit_id': base_view.id,
- 'arch': '<xpath expr="//t[@t-set=\'head_website\']" position="replace"><t t-call-assets="web_editor.summernote" t-js="false" groups="website.group_website_publisher"/></xpath>',
+ 'arch': '<xpath expr="//t[@t-set=\'head_website\']" position="replace"><t t-call-assets="web_editor.assets_summernote" t-js="false" groups="website.group_website_publisher"/></xpath>',
'key': '_website.layout',
})
@@ -844,7 +844,7 @@ class TestCowViewSaving(common.TransactionCase):
'name': 'Forum Layout',
'mode': 'primary',
'inherit_id': inherit_view.id,
- 'arch': '<xpath expr="//t[@t-call-assets=\'web_editor.summernote\'][@t-js=\'false\']" position="attributes"><attribute name="groups"/></xpath>',
+ 'arch': '<xpath expr="//t[@t-call-assets=\'web_editor.assets_summernote\'][@t-js=\'false\']" position="attributes"><attribute name="groups"/></xpath>',
'key': '_website_forum.layout',
})])