For this:

How to remove the space between the header and body in a PDF report?

I set up my sales report to see from this:

<h / "> enter image description here


For this:

<h / "> enter image description here


I commented on a section of code that shows company information inside external_layout_header:

<?xml version="1.0"?>
<t t-name="report.external_layout_header">
    <div class="header">
        <div class="row">
            <div class="col-xs-3">
                <img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 45px;"/>
            </div>
            <div class="col-xs-9 text-right" style="margin-top:20px;" t-field="company.rml_header1"/>
        </div>
        <div class="row zero_min_height">
            <div class="col-xs-12">
                <div style="border-bottom: 1px solid black;"/>
            </div>
        </div>
<!-- COMMENTED
        <div class="row">
            <div class="col-xs-3">
                <div t-field="company.partner_id" t-field-options="{'widget': 'contact', 'fields': ['address', 'name'], 'no_marker': true}" style="border-bottom: 1px solid black;"/>
            </div>
        </div>
-->
    </div>
</t>

Somehow I expected to reduce the space between the title and the body of the report. I tried different ways with no luck. There is a question on the Odoo forum, but for v7 with RML (deprecated). I am using the Ooo v8 QWeb report.

Change 1:

I already tried @Paulo's solution:

<h / "> enter image description here


But that is not what I am looking for. I need to get space by moving the body near the header, and not vice versa.

Change 2 (Decision):

@Paulo, margin_top header_spacing . margin_top 40 20 header_spacing 35 15.

+4
2

: A4.

"" > "" > "" > " " > "A4"

+7

- . , .

-, xml , module_report.xml.

:

<record id="new_id" model="ir.actions.report.xml">
    <field name="paperformat_id" ref="module.new_paper_format"/>
</record>
+3

All Articles