1
votes

I need to define my own headers and footers for invoice reports in Odoo, but I'm having a problem that they just don't fit. The footer gets cut off (the bottom-most content is not visible) and the header overlaps with the body (div class="page") content. Is there any way to increase the space that is left for the header/footer? The page format header spacing seems to define the space BETWEEN the header and body and setting:

<div class="header" style="height: 30%">
<div class="page" style="height: 40%">
<div class="footer" style="height: 30%">

Seems to do f.all no matter what percentages I use. Any ideas?

2

2 Answers

1
votes

if you set paper format in technical setting it will affect other report which used for european A4 or anything which is predefined instead try to give your own custom paper format

<odoo>
<record id="report.paperformat_us" model="report.paperformat">
    <field name="name">US Letter</field>
    <field name="default" eval="True"/>
    <field name="format">Letter</field>
    <field name="page_height">0</field>
    <field name="page_width">0</field>
    <field name="orientation">Portrait</field>
    <field name="margin_top">30</field>
    <field name="margin_bottom">40</field>
    <field name="margin_left">7</field>
    <field name="margin_right">7</field>
    <field name="header_line" eval="False"/>
    <field name="header_spacing">40</field>
    <field name="dpi">90</field>
</record></odoo>

and add report_paperformat.xml under data of openerp.py

0
votes

In menu Setting/Tehnical/Reports/Paper Format/European A4 you set Bottom Margin (mm) (if European A4 is your company format).

Paper Format is defined globally in company view, individually in report definition.