From e70d879accfd93751fa6ecd7fea1acfd9cc7e4ef Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 12 Oct 2012 14:54:18 +0200 Subject: [FIX] add option to avoid actions to be pushed as state. Used for login and action extracted from hash. Full state of client actions is pushed. bzr revid: chs@openerp.com-20121012125418-jbw3iut85riepz47 --- addons/web/static/src/js/chrome.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'addons/web/static/src/js/chrome.js') diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index d7272d8d83f..2cf7ab4e5f8 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1021,15 +1021,13 @@ instance.web.WebClient = instance.web.Client.extend({ var state = $.bbq.getState(true); var action = { - 'type': 'ir.actions.client', - 'tag': 'login', - 'params': state + type: 'ir.actions.client', + tag: 'login', + _push_me: false, }; 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 }); }, @@ -1105,6 +1103,7 @@ instance.web.WebClient = instance.web.Client.extend({ }); }); } else { + state._push_me = false; // no need to push state back... this.action_manager.do_load_state(state, !!this._current_state); } } -- cgit v1.2.3