Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
6526 Переглядів

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

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
7
черв. 24
24716
0
вер. 20
2250
1
черв. 20
11585
0
серп. 19
3777
0
лип. 23
2