From 4f5fc6ee552e5f2edca6401d04761a3c19797dc7 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 6 Feb 2018 11:17:06 +0100 Subject: [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. --- addons/web/static/src/js/core/session.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/js/core/session.js') 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; -- cgit v1.2.3