diff options
| author | qsm-odoo <qsm@odoo.com> | 2018-10-31 14:46:54 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-10-31 15:50:45 +0000 |
| commit | 912d4c2d4195b8bbd434d7a10b03f3fcdfc71254 (patch) | |
| tree | d4773f19d60ba9eb563e5a04f31decec5d7933ca /addons/web_editor/static/src/js/widgets | |
| parent | b2584e141b1d38f091f0bef2bd96698449b19522 (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/widgets')
| -rw-r--r-- | addons/web_editor/static/src/js/widgets/ace.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/widgets/ace.js b/addons/web_editor/static/src/js/widgets/ace.js index bd5b4a9c47a..f3c47f30050 100644 --- a/addons/web_editor/static/src/js/widgets/ace.js +++ b/addons/web_editor/static/src/js/widgets/ace.js @@ -594,7 +594,8 @@ var ViewEditor = Widget.extend({ model: 'ir.ui.view', method: 'write', args: [[session.id], {arch: session.text}], - context: _.extend({}, weContext.get(), {lang: undefined}), + }, { + noContextKeys: 'lang', }).then(function () { self._toggleDirtyInfo(session.id, 'xml', false); def.resolve(); |
