Skip to content
Snippets Groups Projects
Commit 1a5a999c authored by Nans Lefebvre's avatar Nans Lefebvre
Browse files

[FIX] fields, test_translate: multilanguage without en_US


Before, en_US was almost always the default in case of 'no language'.
Now, that should be superseded by lang=None;
yet still, en_US plays the role of source language.

In a multilanguage database where en_US was not installed,
writing a translation with lang=None would crash.
This could prevent module installation.

A test is added to cover that case.

In the case where we write a record with lang=None, the source is the
same as the record; in that case the cache contains the value for the
field.name under the context keys en_US and None, so we need to
invalidate the cache to avoid getting back the old value.

co-authored with mart-e

opw 2088487
opw 2083710

closes odoo/odoo#39040

Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
parent 9e6acaa0
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment