Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
2320 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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







       

          

               
         

   


Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
lip 20
4358
1
gru 23
1686
3
lip 17
10488
1
lis 15
11640
1
sie 24
1982