diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-10-09 02:08:17 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-10-09 02:08:17 +0200 |
| commit | d74b4518052066446e2a1975a91ce53c745ca75a (patch) | |
| tree | c08180f88a512d15e37fbec628931f02b3825f65 /addons/auth_signup/controllers/main.py | |
| parent | ec162dd0cb5622ab6e56db1a63dab5f531a96f4a (diff) | |
| parent | f4105eb9c7010f8693e5d2fd20c0bd9d9cc2e483 (diff) | |
[MERGE] forward port branch 13.0 up to f4105eb9c70
Diffstat (limited to 'addons/auth_signup/controllers/main.py')
| -rw-r--r-- | addons/auth_signup/controllers/main.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py index 6f21118e369..986278e2ab3 100644 --- a/addons/auth_signup/controllers/main.py +++ b/addons/auth_signup/controllers/main.py @@ -124,8 +124,9 @@ 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()] - if request.lang.code in supported_lang_codes: - values['lang'] = request.lang.code + lang = request.context.get('lang', '').split('_')[0] + if lang in supported_lang_codes: + values['lang'] = lang self._signup_with_values(qcontext.get('token'), values) request.env.cr.commit() |
