diff options
| author | Denis Vermylen <dve@odoo.com> | 2017-05-19 15:41:13 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2017-07-06 12:53:39 +0200 |
| commit | 6977a363e45778f04f1786c690f312250c5767de (patch) | |
| tree | 641a4debfb3a5b3b22fec36d5a74c5381674d17e /addons/auth_signup/controllers | |
| parent | 676022e3afdd774c3e0c78cb26c0062133043308 (diff) | |
[IMP] web, auth_signup: add signup and login values to session
When you receive an url with parameters
* auth_signup_token: uuid
* auth_login: login
those will be stored in the session and used
* when the user will want to sign up in order to be linked to the right
partner;
* when he logs in so he's sure to log in with the right account +
autofill is nice
This commit only adds the support, future commits will support its use.
Diffstat (limited to 'addons/auth_signup/controllers')
| -rw-r--r-- | addons/auth_signup/controllers/main.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py index 0b546011b27..1ec853f3dee 100644 --- a/addons/auth_signup/controllers/main.py +++ b/addons/auth_signup/controllers/main.py @@ -12,6 +12,7 @@ from odoo.tools import pycompat _logger = logging.getLogger(__name__) + class AuthSignupHome(Home): @http.route() @@ -89,6 +90,8 @@ class AuthSignupHome(Home): """ Shared helper returning the rendering context for signup and reset password """ qcontext = request.params.copy() qcontext.update(self.get_auth_signup_config()) + if not qcontext.get('token') and request.session.get('auth_signup_token'): + qcontext['token'] = request.session.get('auth_signup_token') if qcontext.get('token'): try: # retrieve the user info (name, login or email) corresponding to a signup token |
