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


I've created a button in the list view that performs an action and it works, but I want to hide it when the user select a value in the listview.

How can I achieve this?

Thanks for your help.

아바타
취소
베스트 답변

Hi,

On the xml file where we added the button(Test) add the condition like below.

<?xml version="1.0" encoding="UTF-8"?>


<templates id="template" xml:space="preserve">


    <t t-extend="ListView.buttons" t-name="button_near_create.button">


       <t t-jquery="button" t-operation="after">


           <t t-if="widget.is_action_enabled('export_xlsx') and widget.isExportEnable">


               <button t-if="widget.modelName == 'res.partner'"


                   class="btn btn-primary o_list_export_xlsx open_wizard_action_kanban oe_highlight"


                   type="button">Open Wizard</button>


           </t>


       </t>


   </t>


</templates>


Regards

아바타
취소
작성자

It works! Thank you for you help

Regards

관련 게시물 답글 화면 활동
2
5월 23
5200
3
4월 24
2793
2
7월 22
4634
1
12월 21
5483
0
8월 24
44