Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
6510 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
7
giu 24
24700
0
set 20
2241
1
giu 20
11549
0
ago 19
3768
0
lug 23
2