Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
2499 มุมมอง

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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







       

          

               
         

   


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ค. 20
4446
1
ธ.ค. 23
1764
3
ก.ค. 17
10652
1
พ.ย. 15
11709
1
ส.ค. 24
2207