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

I have a model called patient contains all patient data, I need to add another menu for some group of users that open the model but without any sensitive data such as Name, but it's by default the _rec_name of the model, how to hide the name of the patient on specific action to be another field or static string like "Patient"

any help will be appreciated...

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

Not sure if it will 100% work or not but still you can try.

Add a context in any of the actions of the menu and override name_get method and pass the value of the field you want to show depending on the context.

อวตาร
ละทิ้ง
ผู้เขียน

i do it by adding a new group this not child of any one else and do a condition in name_get method to show another field and it's worked well

Thanks dear for your answer

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.พ. 25
18859
1
มิ.ย. 24
2741
0
ต.ค. 23
43256
1
ต.ค. 23
4923
Refresh Screen with notication in Odoo แก้ไขแล้ว
2
ก.พ. 23
5339