Skip to Content
Menu
This question has been flagged
2 Replies
2200 Views

I like to add a button on all listviews but this code is not working in the account.move module


<?xml version="1.0" encoding="UTF-8"?>
<template xml:space="preserve">
<t t-extend="ListView.buttons">
<t t-jquery="button.o_list_button_add" t-operation="after">
<button type="button" class="btn btn-secondary o_button_importpdf" accesskey="f">
Import Pdf
</button>
<input type="file" class="o_file_importpdf" style="display:none" accept=".pdf"/>
</t>
</t>
</template>


on other module the code is working, what do i miss?


Avatar
Discard
Best Answer

Hi Fleixi,

You have to Extend BillsListView.buttons for account.move


<? xml version = "1.0" encoding = "UTF-8"?>

<template xml: space = "preserve">

        <t t-extend = "BillsListView.buttons">

            <t t-jquery = "button.o_button_upload_bill" t-operation = "after">

                <button type = "button" class = "btn btn-secondary o_button_importpdf" accesskey = "f">

                    Import Pdf

                </button> 

                <input type = "file" class = "o_file_importpdf" style = "display: none" accept = ". pdf" />

            </t>

        </t>

</template> 

Thanks...

For more information Contact us:- https: //kanakinfosystems.com/odoo-development-services

Avatar
Discard
Author Best Answer

Thanks that helps a lot. Where do i find such information in the documentation?

Avatar
Discard
Related Posts Replies Views Activity
1
Nov 24
150
1
Apr 23
1471
7
Feb 23
7488
0
Sep 22
950
1
Jul 22
473