Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3074 Lượt xem

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?


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 24
1356
1
thg 4 23
2709
7
thg 2 23
9269
0
thg 9 22
1805
1
thg 7 22
1560