Skip to content

Instantly share code, notes, and snippets.

@sehrishnaz
Created February 17, 2020 06:16
Show Gist options
  • Select an option

  • Save sehrishnaz/a6e89074e58e173272c50881127bd3ef to your computer and use it in GitHub Desktop.

Select an option

Save sehrishnaz/a6e89074e58e173272c50881127bd3ef to your computer and use it in GitHub Desktop.
How can i select only the users belongs to a particular group in a many2many field
user_ids = fields.Many2many('res.users', string='Recipients',
domain=lambda self: [("groups_id", "=",
self.env.ref("base.group_erp_manager").id)])
@sehrishnaz
Copy link
Author

For details: Domain on many2many

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment