summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2015-08-20 10:51:49 +0200
committerNicolas Lempereur <nle@odoo.com>2015-08-20 11:09:23 +0200
commit0ea89c10b6ef3c449c93ae6753dd058bcbcc2ddc (patch)
treeb6aa026db2ee9843b92b22535db1e94499eb98ef /addons
parentcfbd086b09faa77f44505e1ba952841e77da6002 (diff)
[FIX] web: keep hash when login redirect
The anchor part of the url should be kept when a login redirect is done. introduced by 8f3f9ef46b note: for 8.0 and saas-6
Diffstat (limited to 'addons')
-rw-r--r--addons/web/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index 7452f5644fc..8e844e816c7 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -314,7 +314,7 @@ def login_redirect():
# built the redirect url, keeping all the query parameters of the url
redirect_url = '%s?%s' % (request.httprequest.base_url, werkzeug.urls.url_encode(request.params))
return """<html><head><script>
- window.location = '%sredirect=' + encodeURIComponent("%s");
+ window.location = '%sredirect=' + encodeURIComponent("%s" + location.hash);
</script></head></html>
""" % (url, redirect_url)