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
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-se| Publicações relacionadas | Respostas | Visualizações | Atividade | |
|---|---|---|---|---|
|
3
jul. 18
|
27978 | |||
|
0
jan. 17
|
3660 | |||
|
1
nov. 24
|
2325 | |||
|
3
abr. 23
|
19430 | |||
|
How to add an user to a group
Resolvido
|
1
dez. 22
|
15296 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
Read more about domain on many2many: https://learnopenerp.blogspot.com/2018/12/add-domain-on-many2many-field-in-odoo.html