From 14ff69a46c588191ed56c015789b3ad45d845c12 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 27 Nov 2018 09:28:51 +0000 Subject: [PATCH] [IMP] web: keep ?query on becoming superuser Being in debug mode is necessary to become superuser (whether on the login page or within the client), however because the becoming endpoint would straight redirect to the _login_redirect result the debug mode would be lost, which is commonly inconvenient. Replace the redirect_with_hash call by local_redirect, which goes through great pains to conserve the ?debug by default. Task 1908202 closes odoo/odoo#29058 --- addons/web/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index db43fcd02ea..d83e4f36f88 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -525,7 +525,7 @@ class Home(http.Controller): request.env['res.users']._invalidate_session_cache() request.session.session_token = security.compute_session_token(request.session, request.env) - return http.redirect_with_hash(self._login_redirect(uid)) + return http.local_redirect(self._login_redirect(uid), keep_hash=True) class WebClient(http.Controller):