diff options
| author | Martin Trigaux <mat@odoo.com> | 2018-07-16 14:57:00 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2018-07-19 09:21:15 +0200 |
| commit | 2472bdb3a1721f5d4e051fcb83bdfda154da01b8 (patch) | |
| tree | aa8264265d6a95bb6a4200ec45a60f32f0ae5ace /addons | |
| parent | 02f38beffbb5053c81e9f6828d36a2de9468b2bc (diff) | |
[FIX] base: remove duplicated translation before update
Since 160d6577, the translations must be unique on the source.
When calling insert_missing on a field, the final step is to set the correct
source on every translation to keep them synchronised.
In case the translation looked like:
id | lang | src | type | res_id | name
---------+-------+-----+-------+--------+------------------
42 | fr_FR | KGM | model | 2 | product.uom,name
43 | fr_FR | kg | model | 2 | product.uom,name
The final step will fail as violating the unicity constraint.
Remove duplicated translations before making the update.
It was chosen to keep the latest translation as it should be the most up to
date (e.g. after an import creating duplicated translations).
Add a non-regression test for previous change
opw-1864123
Closes #25787
Diffstat (limited to 'addons')
0 files changed, 0 insertions, 0 deletions
