Use source of translation in the unique_key of Translation objects

Closes #12467
(grafted from 0917dd05a3105fa45b9699562d5da44e00d1c383)

--HG--
branch : 6.0
This commit is contained in:
Nicolas Évrard committed 2023-08-11 18:40:32 +02:00
1 parent 183b945d84
commit 90f4274dbf
1 file changed
+2 -4
+2 -4
View File
@@ -694,11 +694,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):