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

Hello guys. I have boolean validation field in a module called billing_notice. I only want some users to modify this field.

Let's say, I have user1 user2 and user3

I only want user1 to have the power to modify this field. How can I do this restriction with python code or xml code? If you can provide some example I would love it.

Thanks!!

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

Hi,

You can create a new user group named Edit Validation field, and later you can add the users who need to edit the field to this group.


Now in the view level, you have to make this field readonly for all users initially, can be done by settings readonly="1" in the main view.


Now in order to edit for the user in this group, create an inherited view, set group for this view and remove readonly attribute from the field.


Similar use case: https://www.youtube.com/watch?v=Fsp6lAPHz08

Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.พ. 21
7304
How to know menu parent id? แก้ไขแล้ว
1
ม.ค. 16
6775
1
พ.ย. 21
11245
Foreach in qweb report xml Odoo 8 แก้ไขแล้ว
4
ส.ค. 20
11862
Call Python function from JavaScript แก้ไขแล้ว
6
ม.ค. 19
26049