summaryrefslogtreecommitdiff
path: root/addons/auth_signup/controllers
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-12-29 12:19:58 +0000
committerSébastien Theys <seb@odoo.com>2021-01-05 13:08:37 +0000
commit30c0e4b21ff70de005821ff11426740354600e00 (patch)
tree784d852da9a9af499b506d96911feb03b480edf5 /addons/auth_signup/controllers
parent8af75e00bdcda3d5ff4facd2f5f146e1d6bf79e4 (diff)
[FIX] auth_signup: properly grab user lang from context
Follow up on d0a4b20d3660c09b1ebe203125d57c9a533c7957 The `lang` at this step is compared to the locale `code` (eg. fr_BE) so the split is a mistake. To reproduce the issue: - change the language of a website to fr_BE only - allow free signup - register as a new user Notice how the language of the user is set to en_US before this PR instead of fr_BE as it should be. closes #63616 closes odoo/odoo#64082 X-original-commit: ba21dadf17ba96ecbba917f666a3b385d9b9fd5e Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/auth_signup/controllers')
-rw-r--r--addons/auth_signup/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py
index 82219be6930..d4eb9ec7ec4 100644
--- a/addons/auth_signup/controllers/main.py
+++ b/addons/auth_signup/controllers/main.py
@@ -124,7 +124,7 @@ class AuthSignupHome(Home):
if values.get('password') != qcontext.get('confirm_password'):
raise UserError(_("Passwords do not match; please retype them."))
supported_lang_codes = [code for code, _ in request.env['res.lang'].get_installed()]
- lang = request.context.get('lang', '').split('_')[0]
+ lang = request.context.get('lang', '')
if lang in supported_lang_codes:
values['lang'] = lang
self._signup_with_values(qcontext.get('token'), values)