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

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มี.ค. 23
10045
Cacher le bouton "créer" d'une liste แก้ไขแล้ว
2
มี.ค. 23
2452
Add class to button from function แก้ไขแล้ว
2
พ.ค. 22
4426
0
มี.ค. 22
1599
1
พ.ค. 21
4385