Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
2353 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Auteur

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

Publications associées Réponses Vues Activité
1
juil. 23
1814
0
mai 23
1825
3
mars 25
21828
1
nov. 22
1359
1
mai 22
5171