From a1d68fb7394d29b78e1a1607cadb98d90cf7a1b4 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 14 Aug 2012 11:46:54 +0200 Subject: [PATCH] [IMP] execute original action after login. also pass the current state to login (so the Widget can handle it) bzr revid: chs@openerp.com-20120814094654-fmimm145mrgvznb0 --- addons/web/static/src/js/chrome.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 43747d8e3cf..efcb93f2522 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1019,8 +1019,22 @@ instance.web.WebClient = instance.web.Client.extend({ }, show_login: function() { this.$('.oe_topbar').hide(); - this.action_manager.do_action("login"); - this.action_manager.inner_widget.on('login_successful', this, this.show_application); + + var action = { + 'type': 'ir.actions.client', + 'tag': 'login', + }; + var state = $.bbq.getState(true); + if (state.action === "login") { + action.params = state; + } + + this.action_manager.do_action(action); + this.action_manager.inner_widget.on('login_successful', this, function() { + this.do_push_state(state); + this._current_state = null; // ensure the state will be loaded + this.show_application(); // will load the state we just pushed + }); }, show_application: function() { var self = this;