summaryrefslogtreecommitdiff
path: root/addons/website/controllers/main.py
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2019-06-04 09:26:59 +0000
committerRomain Derie <rde@odoo.com>2019-06-04 09:38:44 +0000
commit9efc11c8daa093dde11d82010d8a56828ed55996 (patch)
tree96cecd0bd9f1a82c99951bb4ebdc053875f70253 /addons/website/controllers/main.py
parentff4f3922a9dd018fee7c855894fc27f588dd6dcd (diff)
[FIX] website: redirect user
Before this commit, user would be redirect to / instead of /my after signup. That error was detected with task-1829827 which has a tour ensuring user is correctly redirected to /my after signup on the checkout summary after payment. Since 0229ef4c4a39, the `web_login()` super call order has been changed when called from the `/web/signup` route. See the commit for more details but basically, before the fix, it went only through: 1. web.web_login 2. portal._login_redirect Where now, it goes through: 1. website.web_login 2. auth_signup.web_login 3. web.web_login 4.portal._login_redirect Thus, portal._login_redirect is not returning `/my` as redirect anymore. Indeed, website.web_login will ignore its super() and force redirect to `/` With this commit, website's user are redirected to /my as expected. Side effect: website's user will also be redirected to /my on login instead of `/`, which is also prefered. closes odoo/odoo#33865 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/website/controllers/main.py')
-rw-r--r--addons/website/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py
index 872cbd6dee2..639118cf73d 100644
--- a/addons/website/controllers/main.py
+++ b/addons/website/controllers/main.py
@@ -93,7 +93,7 @@ class Website(Home):
if request.env['res.users'].browse(request.uid).has_group('base.group_user'):
redirect = b'/web?' + request.httprequest.query_string
else:
- redirect = '/'
+ redirect = '/my'
return http.redirect_with_hash(redirect)
return response