From 57d635f44df6767c849bfaf6e8e9c27a31e9cfa3 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Fri, 14 Oct 2011 01:20:54 +0200 Subject: [PATCH] [FIX] soft reload after module installation lp bug: https://launchpad.net/bugs/873362 fixed bzr revid: al@openerp.com-20111013232054-2i5ptzfurjc429zw --- addons/web/static/src/js/chrome.js | 4 ++++ addons/web/static/src/js/views.js | 4 ++-- addons/web_dashboard/static/src/js/dashboard.js | 5 ++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index dae7ba62ceb..521dc6edc2b 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -970,6 +970,10 @@ openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClie this.login.appendTo($('#oe_login')); this.menu.start(); }, + do_reload: function() { + this.session.session_restore(); + this.menu.do_reload(); + }, on_logged: function() { this.menu.do_reload(); if(this.action_manager) diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 006213086be..cfeb1aa730b 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -123,8 +123,8 @@ db.web.ActionManager = db.web.Widget.extend({ } if (this.dialog && action.context) { var model = action.context.active_model; - if (model === 'base.module.upgrade' || model === 'base.setup.installer') { - db.webclient.menu.do_reload(); + if (model === 'base.module.upgrade' || model === 'base.setup.installer' || model === 'base.module.upgrade') { + db.webclient.do_reload(); } } this.dialog_stop(); diff --git a/addons/web_dashboard/static/src/js/dashboard.js b/addons/web_dashboard/static/src/js/dashboard.js index 0eac5623b45..74393684ad2 100644 --- a/addons/web_dashboard/static/src/js/dashboard.js +++ b/addons/web_dashboard/static/src/js/dashboard.js @@ -485,9 +485,8 @@ openerp.web_dashboard.ApplicationTiles = openerp.web.View.extend({ var self = this; new openerp.web.DataSet(this, 'res.config').call('start', [[]], function (action) { $.unblockUI(); - self.do_action(action, function () { - // TODO: less brutal reloading - window.location.reload(true); + self.widget_parent.widget_parent.do_action(action, function () { + openerp.webclient.do_reload(); }); }); }