From 5ef48dbdfff8fbaf6dd6f3985299271ef0ceaf34 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 24 Mar 2021 08:12:50 +0000 Subject: [PATCH] [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) --- odoo/tools/translate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/odoo/tools/translate.py b/odoo/tools/translate.py index 2ddb18f21a9..fe019442d11 100644 --- a/odoo/tools/translate.py +++ b/odoo/tools/translate.py @@ -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