Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
6539 มุมมอง

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
24744
0
ก.ย. 20
2260
1
มิ.ย. 20
11618
0
ส.ค. 19
3784
0
ก.ค. 23
2