Skip to content

Instantly share code, notes, and snippets.

@sehrishnaz
Created February 17, 2020 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sehrishnaz/a6e89074e58e173272c50881127bd3ef to your computer and use it in GitHub Desktop.
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