Search code examples
odoodropdownhide

Odoo: Hide one option inside a dropdown menu


I would like to hide one of the options that appears in a dropdown menu. For example, i want to hide the option "Modulos" in the dropdown "Equipo" so the user cant select it. Is this possible? How?

Thank you in advance

Dropdown menu


Solution

  • Add domain in your many2one dropdown field.

    equipo = fields.Many2one('model.name', 'Equipo', domain = [('field_name','!=','Modulos')])