Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
2484 Visninger

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.

Avatar
Kassér
Bedste svar

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







       

          

               
         

   


Avatar
Kassér
Bedste svar

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

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
0
jul. 20
4441
1
dec. 23
1760
3
jul. 17
10648
1
nov. 15
11706
1
aug. 24
2202