diff options
| author | Martin Trigaux <mat@odoo.com> | 2018-09-14 10:13:20 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2018-09-14 11:20:38 +0200 |
| commit | a47f7ee0e42604359bdafb90d09d3eba87b701dc (patch) | |
| tree | c79aa6f55fe5b221d481f2d51eb10d9fc842d91e /addons/web/static/src/js | |
| parent | 2e6c1aa5d16f4ede8d9d685336c59e0cac34d487 (diff) | |
[FIX] product: do not translate at code import
Defined as this, the label of the selection field were translated during code
import, when building the python model, not when a user access the field values
as it should (and is already the case thanks to the ORM).
Trying to translate a string when no user-context is available is not only
useless but may cause bug on services with multiple databases (e.g. a SaaS).
In a multi-worker environment, when the code is imported, the _ method will use
multiple scenarios to detect the language and get a cursor.
As we have no available cursor in the frame (method _get_cr from GettextAlias),
the fallback is made on the cursor of the request.
In a multi-worker environment, this could be a cursor linked to a database in
another language than English.
In such scenario, the selections would be translated in the language of the
other database instead of displaying it in English
opw-1881956
Diffstat (limited to 'addons/web/static/src/js')
0 files changed, 0 insertions, 0 deletions
