Skip to Content
Menu
This question has been flagged
1 Atsakyti
6527 Rodiniai

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..

Portretas
Atmesti
Best Answer

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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
7
birž. 24
24717
0
rugs. 20
2250
1
birž. 20
11587
0
rugp. 19
3778
0
liep. 23
2