Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
4755 Ansichten

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

Avatar
Verwerfen
Beste Antwort

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.

Avatar
Verwerfen
Autor

but i need through attrs

Autor

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

Verknüpfte Beiträge Antworten Ansichten Aktivität
2
März 23
10031
2
März 23
2439
2
Mai 22
4402
0
März 22
1583
1
Mai 21
4362