1 答案
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