[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>
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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',
|
||||
})])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user