Skip to Content
Menú
This question has been flagged
1 Respondre
2354 Vistes

i am using below code..below code migrated from v10 to v13

<template id="template" xml:space="preserve">
<t t-extend="ListView.buttons" t-name="customListView.buttons">
<t t-jquery="button.o_list_button_add" t-operation="before">
<!-- Sale Unit -->
<!-- -->
<button t-if="widget.modelName == 'account.asset.asset' and widget.options.action['xml_id'] == 'bi_property_management_extend.action_property_assets_view_from_sale'"
class="btn btn-primary btn-sm oe_action_buttons addMore"
style="width:50px;" type="button">
<span class="fa fa-search-plus" title="Advance Search Sale Unit"/>
</button>
<button t-if="widget.modelName == 'account.asset.asset' and widget.options.action['xml_id'] == 'bi_property_management_extend.action_property_assets_view_from_sale'"
class="btn btn-primary btn-sm oe_action_refresh_buttons"
type="button"><span class="fa fa-refresh" style="font-size:18px" title="Refresh"/></button>

</t>
</t>
</template>
Avatar
Descartar
Best Answer

Hello 

for doing this you can take reference from the Inventory Report.

In tree view you have to add the attribute class like below.

<tree string="Inventory Valuation" js_class="inventory_report_list" create="0" delete="0" decoration-danger="quantity &lt; 0">



Avatar
Descartar
Autor

Thanks for your response i am able to get button using above my code if i remove syntax widget.options.action['xml_id'] == 'bi_property_management_extend.action_property_assets_view_from_sale'"...but the problem is ia m getting button everywhere the account.asset.asset model exists....i need to check xml id to restrict this

Related Posts Respostes Vistes Activitat
1
de jul. 23
1814
0
de maig 23
1825
3
de març 25
21828
1
de nov. 22
1359
1
de maig 22
5171