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

We would like to inherit view account.report_invoice_document and completely replace its content with our own. How to do that?


Our intention is to generate completely different PDF output from scratch, without header and footer.


Thanks for any help.

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

Hello, I am not able to add code, but here is how I would proceed: 

1)overide the template with template, inherit_id; template id="report_invoice_inherit" inherit_id="account.report_invoice"

2)replace web.external_layout with its xpath; xpath expr='//t[@t-call="account.report_invoice_document"]' position="replace" 

Hopes it helps







       

          

               
         

   


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

Hi,

Try this code:

<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="/t[@t-call="account.report_invoice_document"]" position="replace">
                <div>
                    <!-- code -->
                </div>
            </xpath>
</template>


Hope it helps

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 7 20
4446
1
thg 12 23
1764
3
thg 7 17
10652
1
thg 11 15
11709
1
thg 8 24
2207