[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:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user