M.E.
M.E.

Reputation: 5496

Odoo 10 - Qweb PDF report header_spacing and margin_top properties

I am defining my own report.paperformat. I am trying differnet configurations for margin_top and header_space but I can not manage to undersand what does each parameter.

Upvotes: 5

Views: 5015

Answers (2)

Pranjal Gami
Pranjal Gami

Reputation: 214

For more add this to your report.

<record id="paperformat_sales" model="report.paperformat">
    <field name="name">A4 Sale Order</field>
    <field name="default" eval="True" />
    <field name="format">A4</field>
    <field name="page_height">0</field>
    <field name="page_width">0</field>
    <field name="orientation">Portrait</field>
    <field name="margin_top">8</field>
    <field name="margin_bottom">0</field>
    <field name="margin_left">3</field>
    <field name="margin_right">0</field>
    <field name="header_line" eval="False" />
    <field name="header_spacing">5</field>
    <field name="dpi">90</field>
</record>

<record id="action_sale_order" model="ir.actions.report.xml">
    <field name="paperformat_id" ref="your_module_name.paperformat_sales"/>
</record>

Upvotes: 1

Atul Arvind
Atul Arvind

Reputation: 16743

Please see below image.

Odoo Qweb Margin

if you increase the Header spacing you also need to adjust the top margin as well. above image was using

  • Top Margin (mm) = 40.00
  • Header Spacing = 35.00

hope this helps to understand Top Margin and Header Spacing parameter!

Upvotes: 8

Related Questions