Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
6679 Tampilan

I am trying to inherit one group's access rights to another group in odoo using python code.

Example :-

i have a hr_manager group and restrict_user group.

i want to inherit hr_manager group to restrict_user group during creation of a new user.

Please suggest..

Avatar
Buang
Jawaban Terbai

If you have a group A, then you can create/write a group B that inherit the access rights of A. 

self.env['res.groups'].create({'name': 'B', 'implied_ids': [(6, 0, A.ids)]})

implied_ids is a many2many field that does exactly what you need

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
7
Jun 24
25006
0
Sep 20
2401
1
Jun 20
11931
0
Agu 19
3909
0
Jul 23
2