Search code examples
odooodoo-8odoo-9odoo-10odoo-view

Odoo - Filter users with specific group in many2one


I am trying to create a drop-down in my custom module form where i want to show users from a specific group

fields.Many2one('res.user',string="Admins", domain=[('groups_id','=',12)])

this is what i tried, adding a domain but it is not working.

I want to show all user who are admins in this drop-down.


Solution

  • you could try:

    fields.Many2one('res.user',string="Admins", domain=[('groups_id','in',[12])])
    

    I hope this help you