[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.

PS: Forcing the user to set a language ensures that this fallback
will never occur anymore.

opw:2267711

closes odoo/odoo#53375

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
Goffin Simon
2020-06-22 14:00:19 +00:00
parent 6b95f0c144
commit a220f05f4d
+2 -2
View File
@@ -215,7 +215,7 @@
<field name="active" invisible="1"/>
<label for="lang" />
<div class="o_row">
<field name="lang"/>
<field name="lang" required="1"/>
<button
type="action"
name="%(base.res_lang_act_window)d"
@@ -353,7 +353,7 @@
<group>
<label for="lang"/>
<div class="o_row">
<field name="lang" readonly="0"/>
<field name="lang" required="1" readonly="0"/>
<button
type="action"
name="%(base.res_lang_act_window)d"