Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2485 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Penulis

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

Post Terkait Replies Tampilan Aktivitas
1
Jul 23
2042
0
Mei 23
1946
3
Mar 25
22524
1
Nov 22
1594
1
Mei 22
5334