Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
3130 Tampilan

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

Avatar
Buang
Jawaban Terbai

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

Avatar
Buang

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"/>

Post Terkait Replies Tampilan Aktivitas
1
Mar 22
2683
1
Mar 15
5728
1
Mar 15
15983
2
Jul 25
1244
2
Des 24
1810