Search code examples
fieldodoo-8

How can i filter Many2one in Odoo v8


i have a Many2one field with 'ir.model' it gives me a list of different model used in my odoo, on changing the value of this field i want to filter my Many2one with 'ir.model.fields' to list the fields of the chosen model

thanks


Solution

  • You can simply put domain in field declaration of ir_model_field_id. e.g. domain = "[('ir_model_id','=',ir_model_id)]"