Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
8202 Tampilan

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


Avatar
Buang
Jawaban Terbai

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

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
3
Jul 18
27341
0
Jan 17
3356
1
Nov 24
1543
3
Apr 23
18125
1
Des 22
14244