Hello everyone,
How can I remove the space that appears between the header and the body of the invoice?
I tried inspecting my invoice, and the space is caused by the padding-top.
.o_snail_mail .address {
- padding-top: 42px;
}
VIEW CODE of report_invoice_document:
<t t-name="account.report_invoice_document">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context(lang=lang)"/>
<t t-set="forced_vat" t-value="o.fiscal_position_id.foreign_vat"/> <!-- So that it appears in the footer of the report instead of the company VAT if it's set -->
<div class="row">
<t t-if="o.partner_shipping_id and (o.partner_shipping_id != o.partner_id)">
<div class="col-6">
<t t-set="information_block">
<div groups="account.group_delivery_invoice_address" name="shipping_address_block">
<strong>Shipping Address</strong>
<div t-field="o.partner_shipping_id" t-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": True}"/>
</div>
</t>
</div>
<div class="col-6" name="address_not_same_as_shipping">
<t t-set="address">
<address class="mb-0" t-field="o.partner_id" t-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": True}"/>
<div t-if="o.partner_id.vat" id="partner_vat_address_not_same_as_shipping">
<t t-if="o.company_id.account_fiscal_country_id.vat_label" t-out="o.company_id.account_fiscal_country_id.vat_label" id="inv_tax_id_label"/>
<t t-else="">Tax ID</t>: <span t-field="o.partner_id.vat"/>
</div>
</t>
</div>
</t>
<t t-elif="o.partner_shipping_id and (o.partner_shipping_id == o.partner_id)">
<div class="offset-col-6 col-6" name="address_same_as_shipping">
<t t-set="address">
<address class="mb-0" t-field="o.partner_id" t-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": True}"/>
<div t-if="o.partner_id.vat" id="partner_vat_address_same_as_shipping">
<t t-if="o.company_id.account_fiscal_country_id.vat_label" t-out="o.company_id.account_fiscal_country_id.vat_label" id="inv_tax_id_label"/>
<t t-else="">Tax ID</t>: <span t-field="o.partner_id.vat"/>
</div>
</t>
</div>
</t>
<t t-else="">
<div class="offset-col-6 col-6" name="no_shipping">
<t t-set="address">
<address class="mb-0" t-field="o.partner_id" t-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": True}"/>
<div t-if="o.partner_id.vat" id="partner_vat_no_shipping">
<t t-if="o.company_id.account_fiscal_country_id.vat_label" t-out="o.company_id.account_fiscal_country_id.vat_label" id="inv_tax_id_label"/>
<t t-else="">Tax ID</t>: <span t-field="o.partner_id.vat"/>
</div>
</t>
</div>
</t>
</div>
VIEW CODE of external_layout_boxed
<t t-name="web.external_layout_standard">
<div t-attf-class="header o_company_#{company.id}_layout">
<div class="d-flex justify-content-between align-items-center mb-2">
<img t-if="company.logo" class="o_company_logo_small" t-att-src="image_data_uri(company.logo)" alt="Logo"/>
<div t-if="company.report_header" t-field="company.report_header" class="o_company_tagline mw-50 fw-bold">Company tagline</div>
</div>
<div class="row">
<div class="col-6" name="company_address">
<ul class="list-unstyled" name="company_address_list">
<li t-if="company.is_company_details_empty"><span t-field="company.partner_id" t-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": true}">
<div class="bg-light border-1 rounded h-100 d-flex flex-column align-items-center justify-content-center p-0 w-100 opacity-75 text-muted text-center">
<strong>Company address block</strong>
<div>Contains the company address.</div>
</div>
</span></li>
<li t-else="">
<span t-field="company.company_details">
<div class="bg-light border-1 rounded h-100 d-flex flex-column align-items-center justify-content-center p-4 w-100 opacity-75 text-muted text-center">
<strong>Company details block</strong>
<div>Contains the company details.</div>
</div>
</span>
</li>
<li t-if="not forced_vat"/>
<li t-else="">
<t t-esc="company.country_id.vat_label or 'Tax ID'">Tax ID</t>:
<span t-esc="forced_vat">US12345671</span>
</li>
</ul>
</div>
</div>
</div>
<div t-attf-class="article o_report_layout_standard o_table_standard o_company_#{company.id}_layout o_snail_mail {{'o_report_layout_background' if company.layout_background != 'Blank' else ''}}" t-attf-style="background-image: url({{ 'data:image/png;base64,%s' % company.layout_background_image.decode('utf-8') if company.layout_background_image and company.layout_background == 'Custom' else '/base/static/img/demo_logo_report.png' if company.layout_background == 'Demo logo' else ''}});" t-att-data-oe-model="o and o._name" t-att-data-oe-id="o and o.id" t-att-data-oe-lang="o and o.env.context.get('lang')">
<t t-call="web.address_layout"/>
<h2 t-out="layout_document_title"/>
<t t-out="0"/>
</div>
<div t-attf-class="footer o_company_#{company.id}_layout {{report_type != 'pdf' and 'mt-auto'}}">
<div class="o_footer_content d-flex border-top">
<div class="flex-grow-1 text-start me-2" t-field="company.report_footer"/>
<div class="text-end text-muted">
<div t-if="report_type == 'pdf' and display_name_in_footer" t-out="o.name">(document name)</div>
<div t-if="report_type == 'pdf'">Page <span class="page"/> / <span class="topage"/></div>
</div>
</div>
</div>
</t>
Where do I modify the code?
Thanks everyone.