The Custom Invoice Header module enhances Odoo's invoice reporting functionality by adding the invoice number to the header of PDF reports from the second page onwards. This module is designed for Odoo 16 and integrates seamlessly with the existing invoice layout. This code use code from OCA Reporting-Engine -> report_qweb_element_page_visibility
- Displays the invoice number in the header of PDF reports starting from the second page
- Maintains the original invoice header layout, including company logo and details
- Only affects PDF reports, leaving other report types unchanged
- Compatible with Odoo 16
- Clone this repository or download the module files.
- Place the
custom_invoice_header
folder in your Odoo addons directory. - Update the module list in Odoo:
- Enable developer mode
- Go to Apps > Update Apps List
- Search for "Custom Invoice Header" in the Apps menu and install the module.
Once installed, the module automatically applies the custom header to PDF invoice reports. No additional configuration is required.
To see the changes:
- Generate a PDF invoice report with multiple pages.
- Observe that from the second page onwards, the invoice number appears in the header on the right side.
The module works by extending the web.external_layout_standard
template and modifying the header structure for PDF reports. It uses Odoo's report_type
context variable to ensure the custom header is only applied to PDF outputs.
Key files:
__manifest__.py
: Module metadata and dependenciesviews/report_templates.xml
: XML template modifications for the custom header
This module is developed and tested on Odoo 16. It may require modifications to work with other Odoo versions.
For bug reports or feature requests, please use the issue tracker on the project's GitHub repository.
- Nicola Malcontenti [email protected]
- Lorenzo Battistini [email protected]
- Alessio Gerace [email protected]
- Alex Comba [email protected]
- Saran Limpajitkutaporn [email protected]
- Pimolnat Suntian [email protected]
- Tharathip Chaweewongphan [email protected]
Trobz <https://trobz.com>
_:- Hai Lang [email protected]
- Ángel Tornero Hernández [email protected]
Contributions to improve the module are welcome. Please follow these steps:
- Fork the repository
- Create a new branch for your feature
- Commit your changes
- Push to your branch
- Create a new Pull Request
This module is released under the LGPL-3 license. See the LICENSE file for more details.
[Lasse Larsson, Kubang AB, [email protected]]
For more information about Odoo development, visit the official Odoo documentation.