From ecaf40a8eed7d7de73cdf7ccf35cc9bf433a0005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Mon, 29 Jan 2024 18:47:56 +0100 Subject: [PATCH] Skip translation refering to unknown XML ID or unactivated source Closes #12969 --- trytond/trytond/ir/translation.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/trytond/trytond/ir/translation.py b/trytond/trytond/ir/translation.py index b6b7e6b16b..f31cd61632 100644 --- a/trytond/trytond/ir/translation.py +++ b/trytond/trytond/ir/translation.py @@ -960,13 +960,15 @@ class Translation( if (model in fs_id2prop and res_id in fs_id2prop[model]): res_id, noupdate = fs_id2prop[model][res_id] + elif res_id: + continue if res_id: try: res_id = int(res_id) except ValueError: - res_id = None - if not res_id: + continue + else: res_id = -1 translation.res_id = res_id