Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

Report layout repeating issue

Naroči se

Get notified when there's activity on this post

This question has been flagged
layoutodoo18repeating issue
2 Odgovori
824 Prikazi
Avatar
Kalana Piyumantha

 my report layout should be apply for first page only(not the report content file) my problem is , if this report extend for two pages, this report layout is apply to this second page too, but it shouldn't be, i need to remain this laout in this first page only,specially header part  ,  what Can i do? i am using CSS


0
Avatar
Opusti
Avatar
Kalana Piyumantha
Avtor Best Answer

But i am using my own layout(custom one), Howcan i apply it to this one?

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="account_commercial_custom_layout">

<div class="header" style="margin-bottom:50px; page-break-inside: avoid;">
<div class="row" style="display: flex; width:100%;">

<table class="table" style="width: 100%; margin-bottom:5px; border-bottom:none;">
<!-- Row 1: Totals -->
<tr>
<td style="width: 30%; text-align: right;">
<div style="text-align:left;">
<img src="\vkd_invoice_report\static\logo.jpg"
style="max-height: 100px; margin-bottom:5px"
alt="Company Logo"/>
</div>
<div style="font-size: 14px; line-height: 1; text-align:left;">
<strong>REGISTERED ADDRESS:</strong>
<div t-field="o.company_id.partner_id"
t-options='{"widget":"contact","fields":["address","name"],"no-maker":True }'/>
</div>
</td>
<td style="width: 40%;">
<div style="font-size: 14px; line-height: 1; text-align:right; margin-top: 50px;">

<strong t-field="o.company_id.name"/>
<br/>
<span t-field="o.company_id.street"/>
<br/>
<span t-if="o.company_id.street2" t-field="o.company_id.street2"/>
<br/>
<span t-field="o.company_id.city"/>
<span t-if="o.company_id.state_id">,
<span t-field="o.company_id.state_id.name"/>
</span>
<span t-field="o.company_id.zip"/>
<br/>
<span t-if="o.company_id.country_id" t-field="o.company_id.country_id.name"/>
</div>
</td>
<td style="width: 30%; text-align: right;">
<div style="font-size:18px; font-weight:bold; color: #d9534f; text-transform: uppercase; text-align:center; margin-top: 80px">
COMMERCIAL INVOICE
</div>
</td>
</tr>

</table>
</div>
</div>
<div class="article" style="position:relative;">
<!-- Watermark -->
<div t-if="report_type == 'pdf'"
style="position: fixed; top: 30px; left: 0; width: 100%; -webkit-transform: rotate(-30deg); transform:rotate(-30deg); text-align: center; z-index: 0; opacity: 0.15; pointer-events: none;">
<span style="font-size:9em; color:#FF7F50; font-weight:bold; display:inline-block;">
Invoice
</span>
</div>
<t t-raw="0"/>
</div>
<!--footer section-->
<div style="margin-bottom:5px;" class="footer">
<hr style="border:none; border-top: 3px solid #000; margin: 5px 0;"/>
<div style="width:100%; font-size: 20px; margin-bottom:5px;">
<div t-if="report_type == 'pdf'" class="text-muted">
Page:
<span class="page"/>
of
<span class="topage"/>
<span style="float:right; font-size:20px">
<strong>Printed:</strong>
<t t-esc="datetime.datetime.now().strftime('%Y-%m-%d')"/>
</span>
</div>
</div>
</div>
<!--footer section-->
</template>
</odoo>
0
Avatar
Opusti
Cybrosys Techno Solutions Pvt.Ltd

Sure, Install the module first, and then add the template and upgrade the module.

Try the code.

<div class="header first-page" style="margin-bottom:50px; page-break-inside: avoid;">
<div class="row" style="display: flex; width:100%;">

<table class="table" style="width: 100%; margin-bottom:5px; border-bottom:none;">
<tr>
<td style="width: 30%; text-align: right;">
<div style="text-align:left;">
<img src="\vkd_invoice_report\static\logo.jpg"
style="max-height: 100px; margin-bottom:5px"
alt="Company Logo"/>
</div>
<div style="font-size: 14px; line-height: 1; text-align:left;">
<strong>REGISTERED ADDRESS:</strong>
<div t-field="o.company_id.partner_id"
t-options='{"widget":"contact","fields":["address","name"],"no-maker":True }'/>
</div>
</td>
<td style="width: 40%;">
<div style="font-size: 14px; line-height: 1; text-align:right; margin-top: 50px;">
<strong t-field="o.company_id.name"/>
<br/>
<span t-field="o.company_id.street"/>
<br/>
<span t-if="o.company_id.street2" t-field="o.company_id.street2"/>
<br/>
<span t-field="o.company_id.city"/>
<span t-if="o.company_id.state_id">,
<span t-field="o.company_id.state_id.name"/>
</span>
<span t-field="o.company_id.zip"/>
<br/>
<span t-if="o.company_id.country_id" t-field="o.company_id.country_id.name"/>
</div>
</td>
<td style="width: 30%; text-align: right;">
<div style="font-size:18px; font-weight:bold; color: #d9534f; text-transform: uppercase; text-align:center; margin-top: 80px">
COMMERCIAL INVOICE
</div>
</td>
</tr>
</table>
</div>
</div>

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,


To print the header/footer only on the first/last page, you can use the OCA module.


* https://odoo-community.org/shop/report-qweb-element-page-visibility-2192


After installing the module, use the first-page or last-page class.


Header


<div class="header">

    <div class="first-page">

        <div class="row">

            <img t-if="company.custom_report_header"

                 t-att-src="image_data_uri(company.custom_report_header)"

                 alt="Logo" width="100%"/>

        </div>

    </div>

</div>



Footer.


<div class="footer o_standard_footer">

    <div class="last-page">

        <div style="width: 100%;">

             <img t-if="company.custom_report_footer"

             t-att-src="image_data_uri(company.custom_report_footer)"

             alt="Logo" width="100%"/>

          </div>


      </div

</div>



Hope it helps

-1
Avatar
Opusti
Kalana Piyumantha
Avtor

I think this is deprecicated module, there are many more errors, Ared there another solutions?

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

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Odoo18 - How to select Email Templates when sending multiple invoices
odoo18
Avatar
Avatar
1
nov. 25
1605
POS order line custom field (serial_id) not synced to backend after payment (Odoo 18)
odoo18
Avatar
Avatar
1
nov. 25
618
Auto Session time out for users ODOO 18
odoo18
Avatar
Avatar
Avatar
2
sep. 25
3404
Odoo18,in list view,select a record,from 'Actions' menu,select 'Delete',doesn't work properly
odoo18
Avatar
Avatar
1
avg. 25
2634
How to share cash payment method with all the Shop point in POS module in Odoo 18?
odoo18
Avatar
Avatar
1
avg. 25
1658
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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