Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

How to remove the space between the header and the body of the invoice?

Subscribe

Get notified when there's activity on this post

This question has been flagged
invoiceheaderodoofattura
3 Replies
1845 Views
Avatar
Simona Santoro

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 {

  1. 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="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: 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="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: 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="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: 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="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: 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="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: 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.

0
Avatar
Discard
Avatar
Hemangini Patel
Best Answer

Check Paper Format

  • Go to Settings → Technical → Reports → Paper Format.
  • Ensure that Top Margin and Bottom Margin is set to a lower value.
0
Avatar
Discard
Avatar
Ritik (Wan Buffer Services)
Best Answer

​To reduce the space between the header and the body of your invoice reports in Odoo, you can adjust the Paper Format settings associated with the report. Here's how:​

  1. Access Paper Formats:
    • Navigate to Settings.​
    • Under the Technical section, select Reports.
    • Click on Paper Formats.​
  2. Modify the Relevant Paper Format:
    • Identify and select the paper format linked to your invoice report (e.g., A4).​
    • Adjust the following parameters:​
      • Top Margin (mm): Decrease this value to reduce the space above the report content.
      • Header Spacing: Lower this value to bring the body content closer to the header.
    • Save your changes.​

By fine-tuning these settings, you can effectively minimize the gap between the header and the body of your invoice reports. It's advisable to experiment with different values to achieve the desired layout.

1
Avatar
Discard
Avatar
Simona Santoro
Author Best Answer


0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
What are the value need to pass in field 'type' of account.invoice table in Odoo to get Customer_Invoice & Supplier_Invoice ?
invoice odoo
Avatar
Avatar
1
Oct 18
4800
Error Converting Sale Orders to Invoice
invoice odoo
Avatar
0
Oct 15
4207
How to remove product description from invoice lines?
invoice odoo v18
Avatar
Avatar
Avatar
2
Aug 25
3112
Remove link from offer and invoice email Solved
invoice emailtemplate odoo
Avatar
Avatar
Avatar
2
Nov 24
3895
Condition, t-if xml tag, header and footer pdf template base on print action
invoice header templates
Avatar
Avatar
2
Nov 24
2638
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now