تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
6514 أدوات العرض

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
7
يونيو 24
24703
0
سبتمبر 20
2242
1
يونيو 20
11550
0
أغسطس 19
3769
0
يوليو 23
2