تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4731 أدوات العرض

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
مارس 23
10023
2
مارس 23
2435
2
مايو 22
4398
0
مارس 22
1580
1
مايو 21
4341