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

How to restrict the create and edit option in many2one field for particular  user group in odoo 16?

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

Hi @Hemanth

Hope you are doing well,

For you to implement this in Odoo 16 you will need to take the field twice and add the groups to the fields so that one field is visible when it does not have your specific group while other is visible whrn it has your specific group.

Please find Code Example in Comment. 


In the above example when debug mode is active (User has 'base.group_no_one' group) then only the field becomes create and edit. 

Hope this would be helpful.

Thanks & Regards,
Email:   odoo@aktivsoftware.com 

Skype: kalpeshmaheshwari

อวตาร
ละทิ้ง

Here is an example that could be helpful :-

<field name="field_name" options="{'no_create': True, 'no_edit': True}" groups="!base.group_no_one"/>
<field name="field_name" groups="base.group_no_one"/>

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 22
2680
1
มี.ค. 15
5716
1
มี.ค. 15
15979
2
ก.ค. 25
1240
2
ธ.ค. 24
1799