콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4831 화면

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
10181
2
3월 23
2545
2
5월 22
4555
0
3월 22
1681
1
5월 21
4460