Romain Derie
b2b71efb36
[BACKPORT] website: translation if website default lang is not en_US
...
Before this commit:
When website default lang was not en_US, the translation of fields* in the
web_editor would not be saved correctly.
Let's illustrate with fr_BE set as main lang:
The web_editor's RPC calls does not send language in the context when editing
a page (6ebcc06 ), but it does in translation mode.
Note that editing is always performed in the website main lang, fr_BE in this
case.
Therefore:
1. When EDITING:
The backend suppose the language is en_US as there is no lang in the
context (hardcoded everywhere).
It then write in the record itself instead of the ir.translation as it
should since fr_BE is a translation. (In Odoo, every lang is a translation,
en_US is always the main lang)
2. When TRANSLATING (in en_US):
It would also write on model as the web_editor send the language to the
backend when in translate mode. But since en_US is recognized as the main
lang (which is correct), it also writes in the model, overriding the
incorrect fr_BE writing which was also wrote on the model.
This has been fixed in 10.0 with these 2 commits:
036ccbe
2955bf2
With these fixes, the lang is correctly added (by the backend) if the website
module is installed.
By ensuring the lang is correctly set, the ORM _write() function will process
the edition and translation datas as it should:
- If it receive en_US, it will write on the model
- If it receive another lang, it will write on ir.translation
This closes #10883 , closes #22403
*Not the HTML/XML fields which are handled differently by the ORM/translation
2018-02-07 13:35:03 +01:00
..
2018-02-01 02:40:21 +01:00
2017-09-26 11:47:00 +02:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-12-01 02:53:01 +01:00
2018-01-01 02:40:01 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-09-26 11:47:00 +02:00
2017-12-01 02:53:01 +01:00
2018-01-01 02:40:01 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-01-01 02:40:01 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-01-01 02:40:01 +01:00
2018-01-01 02:40:01 +01:00
2018-02-01 02:40:21 +01:00
2018-01-01 02:40:01 +01:00
2018-02-01 02:40:21 +01:00
2018-01-01 02:40:01 +01:00
2018-01-01 02:40:01 +01:00
2018-01-01 02:40:01 +01:00
2018-02-01 02:40:21 +01:00
2017-09-26 11:47:00 +02:00
2018-02-06 20:12:37 +05:30
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-01-01 02:40:01 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-12-01 02:53:01 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-01-01 02:40:01 +01:00
2018-02-01 02:40:21 +01:00
2018-01-01 02:40:01 +01:00
2018-01-01 02:40:01 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-12-01 02:53:01 +01:00
2018-02-01 02:40:21 +01:00
2017-09-26 11:47:00 +02:00
2017-09-24 01:44:27 +02:00
2017-09-26 11:47:00 +02:00
2018-01-01 02:40:01 +01:00
2017-09-26 11:47:00 +02:00
2018-01-01 02:40:01 +01:00
2018-02-01 02:40:21 +01:00
2018-01-01 02:40:01 +01:00
2017-09-26 11:47:00 +02:00
2017-10-31 13:21:16 +01:00
2017-10-26 17:31:25 +02:00
2017-12-15 15:50:43 +01:00
2017-09-26 11:47:00 +02:00
2017-09-24 01:44:27 +02:00
2017-09-26 11:47:00 +02:00
2017-09-24 01:44:27 +02:00
2017-09-24 01:44:27 +02:00
2017-09-26 11:47:00 +02:00
2017-09-26 11:47:00 +02:00
2018-01-01 02:40:01 +01:00
2017-12-01 02:53:01 +01:00
2017-12-13 17:22:51 +01:00
2018-01-11 10:46:31 +01:00
2017-12-20 10:57:42 +01:00
2017-12-13 17:22:51 +01:00
2017-09-26 11:47:00 +02:00
2017-09-26 11:47:00 +02:00
2017-09-26 11:47:00 +02:00
2017-09-24 01:44:27 +02:00
2017-09-26 11:47:00 +02:00
2018-02-01 02:40:21 +01:00
2017-09-26 11:47:00 +02:00
2017-09-24 01:44:27 +02:00
2017-12-19 16:48:35 +01:00
2017-09-26 11:47:00 +02:00
2018-02-01 02:40:21 +01:00
2017-09-24 01:44:27 +02:00
2017-09-26 11:47:00 +02:00
2017-10-27 14:57:33 +02:00
2017-09-24 01:44:27 +02:00
2017-09-26 11:47:00 +02:00
2017-10-27 13:54:31 +02:00
2017-09-24 01:44:27 +02:00
2017-12-01 02:53:01 +01:00
2017-09-24 01:44:27 +02:00
2017-10-27 13:54:31 +02:00
2017-09-24 01:44:27 +02:00
2017-09-26 11:47:00 +02:00
2017-10-27 13:54:31 +02:00
2017-09-24 01:44:27 +02:00
2017-09-26 11:47:00 +02:00
2017-09-24 01:44:27 +02:00
2017-09-26 11:47:00 +02:00
2017-10-27 13:54:31 +02:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-01-01 02:40:01 +01:00
2018-02-01 02:40:21 +01:00
2017-09-26 11:47:00 +02:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-01-01 02:40:01 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-12-01 02:53:01 +01:00
2018-01-26 12:44:18 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-01-01 02:40:01 +01:00
2018-02-07 11:00:48 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-01-01 02:40:01 +01:00
2017-12-01 02:53:01 +01:00
2018-02-01 02:40:21 +01:00
2017-11-08 11:08:53 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-02 17:13:14 +01:00
2017-12-01 02:53:01 +01:00
2018-02-01 02:40:21 +01:00
2018-01-01 02:40:01 +01:00
2018-02-01 02:40:21 +01:00
2017-12-01 02:53:01 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-02 13:26:45 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-12-01 02:53:01 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-12-01 02:53:01 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-09-26 11:47:00 +02:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-09-26 11:47:00 +02:00
2018-02-07 13:35:03 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-12-01 02:53:01 +01:00
2018-02-07 13:35:03 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-09-24 01:44:27 +02:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-12-01 02:53:01 +01:00
2018-02-01 02:40:21 +01:00
2017-12-01 02:53:01 +01:00
2018-02-02 11:04:31 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-09-26 11:47:00 +02:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-12-01 02:53:01 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00
2017-12-01 02:53:01 +01:00
2017-12-01 02:53:01 +01:00
2018-02-01 02:40:21 +01:00
2018-02-01 02:40:21 +01:00