How to restrict the create and edit option in many2one field for particular user group in odoo 16?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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"/>
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 3 22
|
2511 | ||
|
1
thg 3 15
|
5483 | ||
|
1
thg 3 15
|
15715 | ||
|
2
thg 7 25
|
935 | ||
|
2
thg 12 24
|
1465 |