summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/core/session.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2018-02-06 11:17:06 +0100
committerChristophe Matthieu <chm@odoo.com>2018-02-08 15:45:30 +0100
commit4f5fc6ee552e5f2edca6401d04761a3c19797dc7 (patch)
tree849e0deef856f5b72ad30ba12126ae056c97cfac /addons/web/static/src/js/core/session.js
parent83795d37f3b512797dd78de027e444f305ab9ef1 (diff)
[FIX] web: properly set parent when using mixins
The parentedMixin doesn't automatically set the parent, so when this mixin is used, the parent must be set manually. This wasn't done at several places, and thus those elements weren't destroyed with their actual parent. In master, we should probably make the ParentedMixin set the parent itself.
Diffstat (limited to 'addons/web/static/src/js/core/session.js')
-rw-r--r--addons/web/static/src/js/core/session.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/core/session.js b/addons/web/static/src/js/core/session.js
index 670e367be2e..ee9427827ba 100644
--- a/addons/web/static/src/js/core/session.js
+++ b/addons/web/static/src/js/core/session.js
@@ -28,7 +28,8 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, {
"override_session" is set to true.
*/
init: function (parent, origin, options) {
- mixins.EventDispatcherMixin.init.call(this, parent);
+ mixins.EventDispatcherMixin.init.call(this);
+ this.setParent(parent);
options = options || {};
this.module_list = (options.modules && options.modules.slice()) || (window.odoo._modules && window.odoo._modules.slice()) || [];
this.server = null;