summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/editor
diff options
context:
space:
mode:
authorAntoine Guenet <age@odoo.com>2019-03-08 11:57:09 +0000
committerAntoine Guenet <age@odoo.com>2019-03-18 09:32:14 +0000
commitbecfef8f7bb885da6ceff437f68bb6d43e59efce (patch)
treebd35b7472a78e670e3f077188c558442055bedea /addons/website/static/src/js/editor
parent7e96d485c7d91e5fcb3ee59c71ecb5d76827298f (diff)
[FIX] web_editor: properly start website edit mode as restricted editor
It was impossible to open the website's edit mode as a user with "restricted editor" permissions. The reason was that wysiwyg_multizone was trying to manipulate data that is not injected into the html node when `editable` is false (see `website.layout` template). closes odoo/odoo#31702 Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Diffstat (limited to 'addons/website/static/src/js/editor')
-rw-r--r--addons/website/static/src/js/editor/wysiwyg_multizone.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website/static/src/js/editor/wysiwyg_multizone.js b/addons/website/static/src/js/editor/wysiwyg_multizone.js
index 660afe80bdf..070080369c4 100644
--- a/addons/website/static/src/js/editor/wysiwyg_multizone.js
+++ b/addons/website/static/src/js/editor/wysiwyg_multizone.js
@@ -331,7 +331,7 @@ var WysiwygMultizone = Wysiwyg.extend({
var data = this._super();
var res_id = $editable.data('oe-id');
var res_model = $editable.data('oe-model');
- if (!$editable.data('oe-model')) {
+ if (!$editable.data('oe-model') && $('html').data('editable')) {
var object = $('html').data('main-object');
res_model = object.split('(')[0];
res_id = +object.split('(')[1].split(',')[0];