[FIX] translate.py: CSV export correct module name

Correct small typo that the module when exporting translations as CSV
file might have been the wrong module because we used variable from
previous loop.

This did not seem to cause any issue since in this given case in import
we got the module from the part before . in XML ID ({module}.{name})
that was right.

found when working on opw-2439029

closes odoo/odoo#68297

X-original-commit: 62e7b161d39e5f5f6751cf87826fa6f7b729f83d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
Nicolas Lempereur
2021-03-24 11:54:02 +00:00
parent b08afa3475
commit 5ef48dbdff
+2 -1
View File
@@ -1043,7 +1043,8 @@ class TranslationModuleReader:
continue
for record in records:
xml_name = "%s.%s" % (imd_per_id[record.id].module, imd_per_id[record.id].name)
module = imd_per_id[record.id].module
xml_name = "%s.%s" % (module, imd_per_id[record.id].name)
for field_name, field in record._fields.items():
if field.translate:
name = model + "," + field_name