Skip to content
Snippets Groups Projects
Commit a46f8bb9 authored by Martin Trigaux's avatar Martin Trigaux Committed by Raphael Collet
Browse files

[FIX] tools: do not generate translations for exported records

When a record is exported, an external ID, in the form of __export__.<model>_<id>
is created on this record.

When the translations are generated (e.g. "synchronise terms" wizard), the
translations may be duplicated for records that have been exported. If a
translation is submitted before the export (when the record had no external ID
yet), a new empty translation is created as the module differs in the import.

Creating a new translation may be a problem as the new term (equal to the source
term) will be used as the translation value.

Fixes 9480
parent 9481ee5c
Branches
Tags
No related merge requests found
......@@ -671,6 +671,10 @@ def trans_generate(lang, modules, cr):
query += ' WHERE module IN %s'
query_models += ' AND imd.module in %s'
query_param = (tuple(modules),)
else:
query += ' WHERE module != %s'
query_models += ' AND imd.module != %s'
query_param = ('__export__',)
query += ' ORDER BY module, model, name'
query_models += ' ORDER BY module, model'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment