diff options
| author | Olivier Dony <odo@odoo.com> | 2020-06-18 15:01:19 +0000 |
|---|---|---|
| committer | Olivier Dony <odo@odoo.com> | 2020-06-18 17:06:08 +0000 |
| commit | 80379606dbc7d4afdb22476eea97a28ed88fe497 (patch) | |
| tree | c78b59a0c8dac53d0228fffd174efe9c24568b92 /odoo/http.py | |
| parent | 9ae5b5a0ab56d365bbd04f4c956fccfb8f8d19d0 (diff) | |
[REV] Revert c43647f: "[FIX] odoo: Traceback when creating a new contact"
This reverts commit c43647f085a7f62c9c81db6553be6a6e402943d0.
That change was not tested properly and can cause unforeseen errors
because it has far-reaching consequences, modifying the fallback
language on all requests.
One of the consequences is an alteration of the behavior of the
translation function `_()` due to the absence of a default language. For
users with no language set, it will now translate False/None values as
False/None, rather than the empty string fallback. Code that was not
prepared to deal with those non-str translations will now crash.
Besides, 'en_US' is a hardcoded default used in many areas of the code,
and we cannot get rid of it like this, especially in a stable series.
Cfr #52758
closes odoo/odoo#53273
X-original-commit: e220c5a28ecbd160be86b0ce00a7f17bcfaa816e
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'odoo/http.py')
| -rw-r--r-- | odoo/http.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/http.py b/odoo/http.py index 4d2df076032..1a494be1fa3 100644 --- a/odoo/http.py +++ b/odoo/http.py @@ -1071,7 +1071,7 @@ class OpenERPSession(sessions.Session): if lang in babel.core.LOCALE_ALIASES: lang = babel.core.LOCALE_ALIASES[lang] - context['lang'] = lang + context['lang'] = lang or 'en_US' def save_action(self, action): """ |
