Help

1

How to edit default Header & footer of the invoice PDF reports.

Avatar
Sumeet Chikkmat

I want to edit the default header & footer of the Invoice PDF reports. The view of the report is calling web.external.layout for header & footer when I try to make changes to the web.external.layout then it is not accepting the changes.

View of Invoice PDF reports is as below.

========================================

<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document">
<xpath expr="//t[@t-call='web.external_layout']" position="replace">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context({'lang': lang})"/>

======================================

it calling web.externa_layout for header & footer.

I really don't know whether it is for header/footer or not. I want to edit the default header & footer and don't want to create a new one.

Currently, I am using Odoo V12.



1 Berkomentar
Avatar
Buang
Avatar
Sehrish
-
1 Jawaban
2
Avatar
Aswini M
Jawaban Terbaik

Hi,

Please try this,

<template id="external_layout_header_inherit_cr" 
            inherit_id="report.external_layout_header">
            <xpath expr="//div[@class='header']" position="replace">
                <div class="header">
                    <!-- code -->
                </div>
            </xpath>
        </template>
        <template id="external_layout_footer_inherit_cr" 
            inherit_id="report.external_layout_footer">
            <xpath expr="//div[@class='footer']" position="replace">
                <div class="footer">
                    <!--  code -->
                </div>
            </xpath>
        </template>
Aswini - iWesabe


Avatar
Buang