From 2c073283dff2e17be326ca3d7e4a0c83c5801202 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 27 Jan 2012 17:34:46 +0100 Subject: [PATCH] [FIX] don't initialize common controls twice in WebClient root, causes duplicated error popups if going through login page lp bug: https://launchpad.net/bugs/922296 fixed bzr revid: xmo@openerp.com-20120127163446-a2i3vfzzxz0yaujn --- addons/web/static/src/js/chrome.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 3aa3e6042ee..8804de96d34 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1107,12 +1107,13 @@ openerp.web.WebClient = openerp.web.OldWidget.extend(/** @lends openerp.web.WebC self.menu.start(); }, show_common: function() { - var self = this; - self.crashmanager = new openerp.web.CrashManager(); - self.notification = new openerp.web.Notification(self); - self.notification.appendTo(self.$element); - self.loading = new openerp.web.Loading(self); - self.loading.appendTo(self.$element); + if (this.initialized_common) { return; } + this.initialized_common = true; + this.crashmanager = new openerp.web.CrashManager(); + this.notification = new openerp.web.Notification(this); + this.notification.appendTo(this.$element); + this.loading = new openerp.web.Loading(this); + this.loading.appendTo(this.$element); }, destroy_content: function() { _.each(_.clone(this.widget_children), function(el) {