From fbc05e3d22eba8dbbc415b9a658101b5f18fba3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 11 Aug 2023 18:40:32 +0200 Subject: [PATCH] Use source of translation in the unique_key of Translation objects Closes #12467 --- trytond/trytond/ir/translation.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/trytond/trytond/ir/translation.py b/trytond/trytond/ir/translation.py index 869a6e804c..c5858e2ef5 100644 --- a/trytond/trytond/ir/translation.py +++ b/trytond/trytond/ir/translation.py @@ -731,11 +731,9 @@ class Translation(ModelSQL, ModelView): @property def unique_key(self): - if self.type in { - 'report', 'view', 'wizard_button', 'selection'}: - return (self.name, self.res_id, self.type, self.src) - elif self.type in ('field', 'model', 'help'): + if self.type == 'model': return (self.name, self.res_id, self.type) + return (self.name, self.res_id, self.type, self.src) @classmethod def from_poentry(cls, entry):