Always define translation source name

The source name may be used to translate the help selection.

Closes #13839
(grafted from 1b88570858c0188293c5531ce86b1eef96d23086)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier
2025-01-26 17:01:20 +01:00
parent cee6b17006
commit c2f0f9b849
+1 -1
View File
@@ -29,8 +29,8 @@ class SelectionMixin(Field):
pool = Pool()
Translation = pool.get('ir.translation')
definition = super().definition(model, language)
name = '%s,%s' % (model.__name__, self.name)
if not isinstance(self.selection, str) and self.translate_selection:
name = '%s,%s' % (model.__name__, self.name)
selection = []
for key, source in self.selection:
if not isinstance(source, LazyString):