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
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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.
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký