Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3844 Lượt xem

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...

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 2 25
18862
1
thg 6 24
2743
0
thg 10 23
43271
1
thg 10 23
4947
2
thg 2 23
5354