summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/misc.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2016-07-20 09:34:02 +0200
committerAaron Bohy <aab@odoo.com>2016-07-20 16:06:32 +0200
commit1da9f1dc1090a9f5408bf5bc185ee35a9d6595b8 (patch)
treeb34c33bf56ddb35f378fff91f686b5497f6c624a /addons/web/static/src/js/framework/misc.js
parent7b439be2761e2a045a5bebdfe5a57c561e222728 (diff)
[IMP] web: logout client action: prevent toggling app switcher
When the webclient calls do_action from the app_switcher, it toggles it when the returned deferred is resolved. The logout client action didn't return anything, so when logging out from the app switcher, the webclient directly toggled the app_switcher and displayed the last opened action if any, and a gray screen otherwise. This commit makes the client action return a deferred which is never resolved, so the app_switcher isn't toggled when logging out.
Diffstat (limited to 'addons/web/static/src/js/framework/misc.js')
-rw-r--r--addons/web/static/src/js/framework/misc.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/src/js/framework/misc.js b/addons/web/static/src/js/framework/misc.js
index 22bbace458c..e083ee25b22 100644
--- a/addons/web/static/src/js/framework/misc.js
+++ b/addons/web/static/src/js/framework/misc.js
@@ -155,6 +155,7 @@ core.action_registry.add("login", login);
function logout() {
redirect('/web/session/logout');
+ return $.Deferred();
}
core.action_registry.add("logout", logout);