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

I have developed a custom module in odoo 15. I have added user access to my code and have been giving access to the admin manually ( like Settings>Users & Companies>Users>Select Admin User and choosing the access of the module to the admin user). 


Here, I want to provide the default user access to the admin, in which, as I install the custom module, the admin user has the access to the module, as it happens in the sales module. In the sales module, as we install the module the admin user gets the user access as administrator by default.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi Sarina,

You can pass the "users" while creating security groups as below:

<record id="group_project_manager" model="res.groups">
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_services_project"/>
<field name="implied_ids" eval="[(4, ref('group_project_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>

Once you added this  users will be added to group

Thank You

อวตาร
ละทิ้ง
ผู้เขียน

Thank you, Mehjabin Farsana. It worked.

Related Posts ตอบกลับ มุมมอง กิจกรรม
Reset Password แก้ไขแล้ว
1
ก.ย. 22
2348
0
ต.ค. 21
2658
1
ธ.ค. 20
2371
1
มิ.ย. 25
1592
3
ก.ค. 25
3241