0229ef4c4a3960c447040ef186fa28f929bf54e1
To reproduce: 0. Start an odoo v10 instance with --load=saas_worker,web 1. Install ecommerce. 2. Enable "Allow external users to sign up" and "Enable password reset from Login page" from General Settings. 3. Open different session then signup a new user. 4. After successfull signup, the new user will be redirected to the backend (/web). Facts to consider: 1. odoo.addons.auth_signup.controllers.main.AuthSignupHome and odoo.addons.website.controllers.main.Website both inherit odoo.addons.web.controllers.main.Home 2. When instantiating an odoo instance *without* saas_worker,web, the mro is the following: ( <class 'odoo.http.Home (extended by Website, AuthSignupHome)'> , <class 'odoo.addons.auth_signup.controllers.main.AuthSignupHome'> , <class 'odoo.addons.website.controllers.main.Website'> , <class 'odoo.addons.web.controllers.main.Home'> , <class 'odoo.http.Controller'> , <type 'object'> ) while the mro *with* saas_worker,web loaded is: ( <class 'odoo.http.Home (extended by AuthSignupHome, Website)'> , <class 'odoo.addons.website.controllers.main.Website'> , <class 'odoo.addons.auth_signup.controllers.main.AuthSignupHome'> , <class 'odoo.addons.web.controllers.main.Home'> , <class 'odoo.http.Controller'> , <type 'object'> ) You can notice that depending on how the instance is instantiated, the order of inheritance is different. The problem occurs when saas_worker is loaded, so this bug can be experienced by saas clients. Explanation of the fix: Notice that the original code calls web_login of its super in its web_auth_signup method. This is technique is used normally during optimization (according to RCO). If website is installed, the portal user should be redirected to '/' instead of '/web' and this is defined in web_login of website. However, the web_login of "website" is not called after signup because "website" is not super of "auth_signup" when saas_worker is loaded (see the mro above). Calling self.web_login will make sure that web_login is called from top to bottom, and regardless of the order of website and auth_signup, web_login of "website" will be called and makes sure that the new portal user is redirected to the '/' and not to '/web'. opw-1956980 closes odoo/odoo#32741 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
If you are a developer you may type the following command at your terminal:
wget -O- https://raw.githubusercontent.com/odoo/odoo/10.0/setup/setup_dev.py | python
Then follow the developer tutorials
For Odoo employees
To add the odoo-dev remote use this command:
$ ./setup/setup_dev.py setup_git_dev
To fetch odoo merge pull requests refs use this command:
$ ./setup/setup_dev.py setup_git_review
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%