Skip to Content
Menu
This question has been flagged
1 Reply
2031 Views

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
Discard
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
Discard
Author

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 Replies Views Activity
1
Jul 23
1327
0
May 23
1492
3
Apr 23
18822
1
Nov 22
861
1
May 22
4639