Sari la conținut
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Property Management
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Toate postările Oameni Insigne
Etichete (Vezi tot)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Toate postările Oameni Insigne
Etichete (Vezi tot)
odoo accounting v14 pos v15
Despre acest forum
Suport

Page Layout repeat to second page issue

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
qwebreportodoo19
2 Răspunsuri
1013 Vizualizări
Imagine profil
Kalana Piyumantha

I want to print a invoice but when invoice content moves to second page page layout header shouldn't be apply  in second page how can i solve this??

this is my layout

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="custom_invoice_layout">
<t t-set="o" t-value="o or doc"/>
<t t-set="company" t-value="company_id or o.company_id or res_company"/>

<div t-attf-class="header o_company_#{company.id}_layout" t-att-style="report_header_style">
<div class="row">
<div class="col-12 mt-4 mb-4 text-center">
<img t-if="company.logo" t-att-src="image_data_uri(company.logo)"
style="max-height: 120px; max-width: 100%;" alt="Company Logo"/>
</div>
</div>
</div>

<div t-attf-class="article o_report_layout_standard o_company_#{company.id}_layout">
<t t-out="0"/>
</div>

<div t-attf-class="footer o_standard_footer o_company_#{company.id}_layout">
<div class="row">
<div class="col-12 text-center">
<img t-if="company.custom_invoice_footer"
t-att-src="image_data_uri(company.custom_invoice_footer)"
style="width:100%; max-height:120px;" alt="Footer Info"/>
</div>
</div>
</div>

</template>
</odoo>
0
Imagine profil
Abandonează
Imagine profil
Cybrosys Techno Solutions Pvt.Ltd
Cel mai bun răspuns

Hi,

You would wrap the entire header content within a <t t-if="page == 1"> tag. The page variable is automatically available in the QWeb rendering context for multi-page reports.
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <template id="custom_invoice_layout">
        <t t-set="o" t-value="o or doc"/>
        <t t-set="company" t-value="company_id or o.company_id or res_company"/>

        <!-- Start of the conditional header -->
        <t t-if="page == 1">
            <div t-attf-class="header o_company_#{company.id}_layout" t-att-style="report_header_style">
                <div class="row">
                    <div class="col-12 mt-4 mb-4 text-center">
                        <img t-if="company.logo" t-att-src="image_data_ur"/>
                        <!-- ... rest of your header content would go here ... -->
                    </div>
                </div>
            </div>
        </t>
        <!-- End of the conditional header -->

        <!-- The main content of your invoice would follow here, outside the t-if block -->
        <!-- For example, the <div class="page"> where the invoice lines and details are rendered -->

    </template>
</odoo>

Hope it helps.


0
Imagine profil
Abandonează
Imagine profil
Zehntech Technologies Inc.
Cel mai bun răspuns

Hello

In Odoo reports, elements placed inside the header section of the layout are automatically repeated on every page because the PDF engine (wkhtmltopdf) treats them as a fixed report header.

If you want the header to appear only on the first page, you should move the header content (logo block) inside the article/body section instead of the header div.

For example:

<div t-attf-class="article o_report_layout_standard o_company_#{company.id}_layout">


<!-- Header shown only once -->

<div class="row">

<div class="col-12 mt-4 mb-4 text-center">

<img t-if="company.logo"

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

style="max-height: 120px; max-width: 100%;" />

</div>

</div>


<t t-out="0"/>

</div>

By doing this, the header becomes part of the page content, so it will only appear at the beginning of the invoice and will not repeat when the content continues on the next page.

Hope this works for you! Feel free to reach out for further discussion.

Regards,

Zehntech Technologies Inc.

santosh.sekwadia@zehntech.com

0
Imagine profil
Abandonează
Îți place discuția? Nu doar citi, alătură-te!

Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!

Înscrie-te
Postări similare Răspunsuri Vizualizări Activitate
[Odoo19] How can I create table of contents in qweb report dynamically Rezolvat
qweb report odoo19
Imagine profil
Imagine profil
Imagine profil
Imagine profil
3
mar. 26
1118
[ODOO 19] QWEB report generates ​, Â, and other symbol. Why?
pdf qweb report odoo19
Imagine profil
0
apr. 26
21
odoo 16 report target new page scss
qweb report
Imagine profil
Imagine profil
1
apr. 25
3904
Missing external identifier on new external layout template Rezolvat
qweb report
Imagine profil
Imagine profil
2
mar. 25
4697
Translate month name in t-esc Qweb report Rezolvat
qweb report
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
4
nov. 24
9891
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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