Hi,
I have a many2many field(user_ids) of model res.users.In that field i only need to show the users coming under a particular group.How can i achieve this.
user_ids = fields.Many2many('res.users', String='Users')
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
I have a many2many field(user_ids) of model res.users.In that field i only need to show the users coming under a particular group.How can i achieve this.
user_ids = fields.Many2many('res.users', String='Users')
Thanks
Hi,
You can give the domain for the field based on the user group like this,
user_ids = fields.Many2many('res.users', string='Recipients',
domain=lambda self: [("groups_id", "=",
self.env.ref("base.group_erp_manager").id)])
Thanks
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye Olİlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
---|---|---|---|---|
|
3
Tem 18
|
27329 | ||
|
0
Oca 17
|
3343 | ||
|
1
Kas 24
|
1516 | ||
|
3
Nis 23
|
18089 | ||
How to add an user to a group
Çözüldü
|
|
1
Ara 22
|
14224 |
Read more about domain on many2many: https://learnopenerp.blogspot.com/2018/12/add-domain-on-many2many-field-in-odoo.html