diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2015-06-16 19:45:43 +0200 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2015-06-17 11:33:20 +0200 |
| commit | 3f1e99c4b95d824b044297b47b69fe4ed4eae28c (patch) | |
| tree | e38515e6bfdfa9b0f346c6e0195a09273d9a13f1 /addons/web/controllers/main.py | |
| parent | dca1894b5d3567cb1ed209ce1069dc365489d0e6 (diff) | |
[FIX] web, website_form_website_sale: form and login
Partial backport of commit 093e39bd.
When a flow is stopped by a login redirection, some data (e.g: a product
comment being posted) could be lost. This commit in this case convert
POST request data to GET data (so it is possible to add a GET controller
which after login will terminate the action).
closes #7100
opw-642350
Diffstat (limited to 'addons/web/controllers/main.py')
| -rw-r--r-- | addons/web/controllers/main.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 340b57da5f1..7452f5644fc 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -311,12 +311,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') |
