summaryrefslogtreecommitdiff
path: root/addons/web/controllers/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/controllers/main.py')
-rw-r--r--addons/web/controllers/main.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index d72404e4314..894faec7e51 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -312,12 +312,12 @@ def set_cookie_and_redirect(redirect_url):
def login_redirect():
url = '/web/login?'
- if request.debug:
- url += 'debug&'
+ # 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(window.location);
+ window.location = '%sredirect=' + encodeURIComponent("%s");
</script></head></html>
- """ % (url,)
+ """ % (url, redirect_url)
def load_actions_from_ir_values(key, key2, models, meta):
Values = request.session.model('ir.values')