[FIX] base: flatten if ir.model.field.selection selection ids

The `get_technical_translations()` method was returning wrong list of list
for field selection values; instead we flatten the results to get a correct
domain.

closes odoo/odoo#37101

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
Xavier ALT
2019-09-18 16:41:17 +00:00
parent 335d9d1210
commit 5c1c092265
+1 -1
View File
@@ -832,7 +832,7 @@ class IrTranslation(models.Model):
:return: action definition to open the list of available translations
"""
fields = self.env['ir.model.fields'].search([('model', '=', model_name)])
selection_ids = [field.selection_ids.ids for field in fields if field.ttype == 'selection']
selection_ids = tools.flatten([field.selection_ids.ids for field in fields if field.ttype == 'selection'])
view = self.env.ref("base.view_translation_tree", False) or self.env['ir.ui.view']
return {
'name': _("Technical Translations"),