Reporting is used in every organization to track the development of their business. On the other hand, reporting is equally essential for showcasing the growth of Odoo. The most popular qweb reports in Odoo for printing sales, purchase orders, quotes, and invoices are PDF reports.
The report can be printed in a variety of formats, widths, and heights in Odoo. For every report, Odoo can configure a unique paper format.
<record id="paperformat_euro_light" model="report.paperformat">
<field name="name">A4 (No Margin)</field>
<field name="default" eval="True"/>
<field name="format">A4</field>
<field name="orientation">Portrait</field>
<field name="margin_top">32</field>
<field name="margin_bottom">0</field>
<field name="margin_left">0</field>
<field name="margin_right">0</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="header_line" eval="False"/>
<field name="header_spacing">32</field>
<field name="dpi">100</field>
<field name="css_margins" eval="True"/>
</record>
The model report.paperformat is used for creating paper formats.
With a unique name as the ID, we can build the record.
The name is one of the required fields in paper format. It is referred to as "A4 (No Margin)" here.
<field name="name">A4(No Margin)</field>
Format
We can use a predefined format (A0 to A9, B0 to B10, Legal, Letter, Tabloid) or create our own, using the standard A4 format for each paper. A PDF report is printed out using this field format.
<field name="format">A4</field>
DPI
The number of dots that can be placed on a line is indicated by this parameter, which stands for “Dot Per Inch". 90 is normally set by default. Here we are using 100.
<field name="dpi">100</field>
Margin Top and Bottom
These fields illustrate the margin sizes in mm at the top and bottom.
<field name="margin_top">32</field>
<field name="margin_bottom">0</field>
Margin Left and Right
These fields illustrate the margin-left and margin-right in mm.
<field name="margin_left">0</field>
<field name="margin_right">0</field>
Page Height and Width
These fields illustrate the page height and width in mm.
<field name="page_height">0</field>
<field name="page_width">0</field>
Orientation
This field manages the report's organization and orientation, which is a crucial component that aids in personalized navigation. It may be orientated either in portrait or landscape mode.
<field name="orientation">Portrait</field>
Header Line
Displaying the header line is aided by this field. We can configure it as True or False, and it functions as a Boolean.
<field name="header_line" eval="False"/>
Header Spacing
This parameter maintains a specific distance between the reports and provides header spacing in millimeters. The header_spacing is set to 32 mm.
<field name="header_spacing">32</field>
Now, let’s create a paper format from Settings > Technical > Reporting > Paper Format.

Using the paperformat_id field, we can use the paper format in the report. Check the example from the Reception Report Label.
<record id="label_picking" model="ir.actions.report">
<field name="name">Reception Report Label</field>
<field name="model">stock.move</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">stock.report_reception_report_label</field>
<field name="report_file">stock.report_reception_report_label</field>
<field name="paperformat_id" ref="product.paperformat_label_sheet_dymo"/>
<field name="binding_type">report</field>
</record>
To read more about How to Add Custom Paper Format in Odoo 17, refer to our blog How to Add Custom Paper Format in Odoo 17.