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

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

頭像
捨棄
最佳答案

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.

頭像
捨棄
作者

but i need through attrs

作者

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)]}" />

相關帖文 回覆 瀏覽次數 活動
2
3月 23
10036
2
3月 23
2446
2
5月 22
4409
0
3月 22
1588
1
5月 21
4379