diff --git a/trytond/ir/translation.py b/trytond/ir/translation.py index 6e2b72c204..6ac252556b 100644 --- a/trytond/ir/translation.py +++ b/trytond/ir/translation.py @@ -112,6 +112,16 @@ class Translation(ModelSQL, ModelView, Cacheable): res[translation.id] = translation.name.split(',')[0] return res + def search_rec_name(self, name, clause): + clause = tuple(clause) + ids = self.search(['OR', + ('src',) + clause[1:], + ('value',) + clause[1:], + ]) + if ids: + return [('id', 'in', ids)] + return [(self._rec_name,) + clause[1:]] + def search_model(self, name, clause): cursor = Transaction().cursor cursor.execute('SELECT id FROM "%s" '