summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/editor/rte.js
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2018-10-31 14:46:54 +0000
committerqsm-odoo <qsm@odoo.com>2018-10-31 15:50:45 +0000
commit912d4c2d4195b8bbd434d7a10b03f3fcdfc71254 (patch)
treed4773f19d60ba9eb563e5a04f31decec5d7933ca /addons/web_editor/static/src/js/editor/rte.js
parentb2584e141b1d38f091f0bef2bd96698449b19522 (diff)
[FIX] web_editor: fix automatic editor context for RPCs
With https://github.com/odoo/odoo/commit/55131b8f5becdd3d4776f4c3e7e4288a0b185706, we automatically add the known editor context (containing lang, website_id, etc) when using the `this._rpc` method. Some RPCs needed however to explicitely not send a value from this automatic context... but this was not correctly implemented. This can now be achieved by using the `noContextKeys` key in the `this._rpc`'s *options* parameter. closes odoo/odoo#28322
Diffstat (limited to 'addons/web_editor/static/src/js/editor/rte.js')
-rw-r--r--addons/web_editor/static/src/js/editor/rte.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/editor/rte.js b/addons/web_editor/static/src/js/editor/rte.js
index dfa77214c3a..bf16cc090e5 100644
--- a/addons/web_editor/static/src/js/editor/rte.js
+++ b/addons/web_editor/static/src/js/editor/rte.js
@@ -576,7 +576,9 @@ var RTEWidget = Widget.extend({
this._getEscapedElement($el).prop('outerHTML'),
$el.data('oe-xpath') || null,
],
- context: withLang ? context : _.extend({}, context, {lang: undefined}),
+ context: context,
+ }, withLang ? undefined : {
+ noContextKeys: 'lang',
});
},