From 1bfdf9219d634f75e44b2b2440e14958080cd981 Mon Sep 17 00:00:00 2001 From: Pierre Paridans Date: Fri, 12 Jul 2019 09:52:12 +0000 Subject: [IMP] web: unused on_modules_loaded hook `window.openerp` being undefined, the method `on_modules_loaded` throws an error when reaching its purpose (loading additional modules)... The commit odoo/odoo@905e01921f3c3ef43ace6fc537d1d8c0d280002c removed the compatibility layer for Odoo v8 (compatibility.js) which contained the `window.openerp` declaration. Being broken for that long without consequences, this feature proved to not be useful anymore. We then remove it. closes odoo/odoo#34821 Signed-off-by: Aaron Bohy (aab) --- addons/web/static/src/js/core/session.js | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (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 dac8e0077f1..09d765fbc5b 100644 --- a/addons/web/static/src/js/core/session.js +++ b/addons/web/static/src/js/core/session.js @@ -64,17 +64,12 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, { * Setup a session */ session_bind: function (origin) { - var self = this; this.setup(origin); qweb.default_dict._s = this.origin; this.uid = null; this.username = null; this.user_context= {}; this.db = null; - this.module_loaded = {}; - _(this.module_list).each(function (mod) { - self.module_loaded[mod] = true; - }); this.active_id = null; return this.session_init(); }, @@ -212,10 +207,7 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, { } return loaded.then(function () { return self.load_js(file_list); - }).then(function () { - self.on_modules_loaded(); - self.trigger('module_loaded'); - }); + }); }, load_translations: function () { return _t.database.load_translations(this, this.module_list, this.user_context.lang, this.translationURL); @@ -250,25 +242,6 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, { }); return lock; }, - on_modules_loaded: function () { - var openerp = window.openerp; - for(var j=0; j