This question has been flagged
1 Reply
954 Views

Where can I change the  header, and footer of the Sales Report, Invoices in  Odoo15?

i can inherit and modify sale template but not show image  proper top center position 

xml version="1.0" encoding="utf-8"?>

id="sale_report_inherit_template" inherit_id="sale.report_saleorder_document">
expr="//div[@t-field='doc.partner_id']" position="before">
style="text-align:center;">
src='/inreport/static/img/header.jpg' height="120" width="220" top="10 "/>



 


Any help would be greatly appreciated  

Avatar
Discard
Best Answer

Hello Umar Maniar,

To add your custom header, either you can inherit the “web.external_layout_standard” template or can directly inherit the “sale.report_saleorder_document” and do the following:

Please find code in comment. 

Here , I’ve inherited the “report_saleorder_document” template and positioned my header before the “web.external_layout” is called, As the “web.external_layout” consists the header and footer , and upon making changes in it will reflect in all the reports.
You can follow the same thing in other reports as well.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Avatar
Discard

<template id="sale_layout_inherit" inherit_id="sale.report_saleorder_document">
<xpath expr="//*[@t-call='web.external_layout']" position="before">
<div class="header text-center">
<div>
<img t-if="doc.company_id.logo" t-att-src="image_data_uri(doc.company_id.logo)" style="max-height: 45px;" alt="Logo"/>
</div>
</div>
</xpath>
</template>