diff options
| author | Martin Trigaux <mat@odoo.com> | 2017-12-05 16:57:29 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2018-01-04 15:22:12 +0100 |
| commit | ad3b28fd8957a717b4a5ba7292068276925495ee (patch) | |
| tree | fcda4940b3fec802487350a2041914766c1475e9 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 160d657704037fd22051f4101e9b477ae1ff0340 (diff) | |
[FIX] base: do not insert duplicated translations
This will avoid unique constrain to be raised in the scenario of a record having
multiple ir.model.data entries to the same record.
This can be reproduced in standard with the following scenario
1. The product.template product_product_4_product_template has multiple variants
product_product_4
product_product_4b
product_product_4c
...
2. At the creation of the records, ir.model.data are automatically created
product_product_4_product_template
product_product_4b_product_template
product_product_4c_product_template
...
While this could/should be fixed too. Having several ir.model.data to the
same record is not forbidden and could be reproduced in different ways.
3. Export the translations
#. module: product
#: model:product.product,description_sale:product.product_product_4
#: model:product.product,description_sale:product.product_product_4b
#: model:product.product,description_sale:product.product_product_4c
#: model:product.template,description_sale:product.product_product_4_product_template
#: model:product.template,description_sale:product.product_product_4b_product_template
#: model:product.template,description_sale:product.product_product_4c_product_template
msgid ""
...
As the field description_sale is present on both model and is translatable
4. Load a .po file with these translations
The 3 product.template entries points to the same record, making the unique
constrain raise an error
This error can also be reproduced with the project_time_mode_id_duplicate_xmlid
field creating two xmlid for the same ir.model.fields
Closes #21472
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
