I have my localhost and I am trying to reduce the size of footer part in my custom pdf template. but that's not working. Is anyone have some suggestions to do that properly?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
Hi,
You need to adjust the paper size format, such as the page height and width:
Using the Odoo Interface:
Go to Settings → Technical → Reports and Locate the report you want to modify. Check the "Paper Format" field associated with the report.
Edit the existing paper format or create a new one. You can customize settings such as paper size, margins, and orientation.
Using XML Code:
You can define a custom paper format and associate it with a specific report by adding the following XML code in your module:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="custom_paperformat_small_footer" model="report.paperformat">
<field name="name">Custom Small Footer Format</field>
<field name="default" eval="False"/>
<field name="format">custom</field>
<field name="page_height">150</field>
<field name="page_width">60</field>
<field name="margin_top">5</field>
<field name="margin_bottom">5</field>
<field name="header_spacing">5</field>
<field name="orientation">Portrait</field>
<field name="dpi">90</field>
</record>
<!-- Link the new paperformat to a specific report -->
<record id="your_module_report_action" model="ir.actions.report">
<field name="paperformat_id" ref="custom_paperformat_small_footer"/>
</record>
</odoo>
Replace your_module_report_action with the actual report action ID. Adjust the page_height, page_width, and margins according to your needs. After adding or modifying the XML, upgrade your module for the changes to take effect
Hope it helps
Thank you for your answer. now it's working.
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire