Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Report layout repeating issue

Odoberať

Get notified when there's activity on this post

This question has been flagged
layoutodoo18repeating issue
2 Replies
836 Zobrazenia
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
Zrušiť
Avatar
Kalana Piyumantha
Autor 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
Zrušiť
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
Zrušiť
Kalana Piyumantha
Autor

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!

Registrácia
Related Posts Replies Zobrazenia Aktivita
Odoo18 - How to select Email Templates when sending multiple invoices
odoo18
Avatar
Avatar
1
nov 25
1623
POS order line custom field (serial_id) not synced to backend after payment (Odoo 18)
odoo18
Avatar
Avatar
1
nov 25
631
Auto Session time out for users ODOO 18
odoo18
Avatar
Avatar
Avatar
2
sep 25
3412
Odoo18,in list view,select a record,from 'Actions' menu,select 'Delete',doesn't work properly
odoo18
Avatar
Avatar
1
aug 25
2635
How to share cash payment method with all the Shop point in POS module in Odoo 18?
odoo18
Avatar
Avatar
1
aug 25
1663
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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