跳至內容
選單
此問題已被標幟
1 回覆
3159 瀏覽次數

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

相關帖文 回覆 瀏覽次數 活動
1
3月 22
2720
1
3月 15
5759
1
3月 15
16010
2
7月 25
1253
2
12月 24
1862