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

The button should be visible only to the employee who logged in but not be visible on the other employee card in employee module? please help

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

You have to create a New Group in users, you give it a name, "Extra Buttons" for instance, then add the user o users in this group to whom you want to display the button, and in view:

<button name="My Extra Button" groups="Extra Buttons" .../>

So the users in that group can see the button.

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

but i need through attrs

Tác giả

when he logs in he must be accessible, the button cannot be viewed on other employee details?

i need through attrs

Then add a new boolean field in employee model is_custom_employee, and

<field name="extrabutton" attrs="{'invisible':[('is_custom_employee', '=', False)]}" />

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 3 23
10272
2
thg 3 23
2572
2
thg 5 22
4615
0
thg 3 22
1711
1
thg 5 21
4525