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

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

相關帖文 回覆 瀏覽次數 活動
3
2月 25
18858
1
6月 24
2740
0
10月 23
43253
1
10月 23
4923
2
2月 23
5339