[FIX] odoo: Traceback when creating a new contact

Steps to reproduce the bug:

- Let's consider a new instance with default installed language 'en_US'
- Install CRM
- Activate a second language (e.g. en_GB)
- Set that language in all users
- Inactivate default language 'en_US'
- Reset the language of your current user (no value)
- Go to contact and try to create a new one

Bug:

A traceback was raised because the lang en_US did not exist.

opw:2267711

closes odoo/odoo#53064

X-original-commit: c43647f085a7f62c9c81db6553be6a6e402943d0
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
Goffin Simon
2020-06-16 13:04:46 +00:00
parent 435e5db0a9
commit f5089a0b0e
+1 -1
View File
@@ -1071,7 +1071,7 @@ class OpenERPSession(sessions.Session):
if lang in babel.core.LOCALE_ALIASES:
lang = babel.core.LOCALE_ALIASES[lang]
context['lang'] = lang or 'en_US'
context['lang'] = lang
def save_action(self, action):
"""