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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
May 23
|
4214 | ||
|
3
Apr 24
|
687 | ||
|
2
Jul 22
|
3182 | ||
|
1
Dec 21
|
4258 | ||
|
0
Aug 24
|
44 |