İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

How to add page number in Qweb reports in odoo

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
3 Cevaplar
37945 Görünümler
Avatar
Gopakumar N G

How to add page numbers as page X of Y in Qweb reports in odoo.

3
Avatar
Vazgeç
Cliff Kujala

Have you tried my solution below? If it helps, please upvote.

Avatar
Cliff Kujala
En İyi Yanıt

Try this:

<span>Page </span><span class="page" /> of <span class="topage" />

But keep in mind, this will only work when the report type is PDF, not HTML.

I am not using external_layout_footer in my Sales Order/Quote or Invoice Qweb report printouts. I instead have the header and footer written directly into the "document" Qweb views. My footer looks like this, which will give you a nice small Page Y of X in the lower left corner of the page.

<div class="footer">
            <div class="row">
                <div class="col-xs-2 pull-left">
                    <small>
                        <span>Page</span>
                        <span class="page" />
                        of
                        <span class="topage" />
                    </small>
                </div>
            </div>
        </div>

Try this out for a header:

<div class="header">
            <div class="row">
                <div class="col-xs-3">
                    <!-- <img t-if="o.company_id.logo" t-att-src="'data:image/png;base64,%s' % o.company_id.logo" style="max-height: 125px;"/> -->
                </div>
                <small>
                <div class="col-xs-2 text-right">
                    <div t-field="o.company_id.partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: true}"/>
                </div>
                <div class="col-xs-2">
                    <div t-field="o.company_id.partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;phone&quot;, &quot;website&quot;, &quot;email&quot;], &quot;no_marker&quot;: true}"/>
                </div>
                </small>
                <div class="col-xs-4">
                    <span class="text-right">
                        <h4>
                            <span t-if="o.state not in ['draft','sent']">Order N°</span>
                            <span t-if="o.state in ['draft','sent']">Quote N°</span>
                            <span t-field="o.name" />
                        </h4>
                    </span>
                    <small>
                        <div class="row">
                            <div class="col-xs-8 text-right">
                                <span t-if="o.state not in ['draft','sent']">Order Date</span>
                                <span t-if="o.state in ['draft','sent']">Quote Date</span>
                            </div>
                            <div class="col-xs-4 text-right">
                                <span t-field="o.date_order" t-field-options="{&quot;format&quot;: &quot;yyyy-MM-dd&quot;}" />
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-xs-8 text-right">
                                <span t-if="o.write_date">Modified Date</span>
                            </div>
                            <div class="col-xs-4 text-right">
                                <span t-field="o.write_date" t-field-options="{&quot;format&quot;: &quot;yyyy-MM-dd&quot;}" />
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-xs-8 text-right">
                                <span t-if="o.user_id.name">Salesperson</span>
                            </div>
                            <div class="col-xs-4 text-right">
                                <span t-field="o.user_id.name" />
                            </div>
                        </div>
                    </small>
                </div>
            </div>
            <div class="row">
            <small>
                <div class="col-xs-2">
                    <strong>Customer</strong>
                    <div t-field="o.partner_invoice_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: true}" />
                </div>
                <div class="col-xs-2">
                    <strong>Contact</strong>
                    <div t-field="o.partner_invoice_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;phone&quot;, &quot;mobile&quot;, &quot;email&quot;], &quot;no_marker&quot;: true}" />
                </div>
                <div class="col-xs-2">
                    <strong>Shipping Address</strong>
                    <div t-if="o.partner_shipping_id == o.partner_invoice_id">Same as billing</div>
                    <div t-if="o.partner_shipping_id != o.partner_invoice_id">
                        <div t-field="o.partner_shipping_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;, &quot;phone&quot;], &quot;no_marker&quot;: true}" />
                    </div>
                </div>
                <div class="col-xs-6">
                    <!-- rest of customer ref info -->
                    <strong t-if="o.state not in ['draft','sent']">Order Terms</strong>
                    <strong t-if="o.state in ['draft','sent']">Quote Terms</strong>
                    <div class="row">
                        <div class="col-xs-6">
                            <div t-if="o.client_order_ref">
                                PO / Ref:
                                <span t-field="o.client_order_ref" />
                            </div>
                            <div t-if="o.payment_term">
                                Term:
                                <span t-field="o.payment_term" />
                            </div>
                            <div t-if="o.incoterm">
                                Incoterm:
                                <span t-field="o.incoterm" />
                            </div>
                            <div t-if="o.carrier_id">
                                Delivery Method:
                                <span t-field="o.carrier_id" />
                            </div>
                        </div>
                        <div class="col-xs-6">
                            <div t-if="o.state in ['draft','sent']">
                                <div t-if="o.validity_date">
                                    Expiry Date:
                                    <span t-field="o.validity_date" t-field-options="{&quot;format&quot;: &quot;yyyy-MM-dd&quot;}" />
                                </div>
                            </div>
                            <div t-if="o.requested_date">
                                Requested Date:
                                <span t-field="o.requested_date" t-field-options="{&quot;format&quot;: &quot;yyyy-MM-dd&quot;}" />
                            </div>
                            <div t-if="o.state">
                                Status:
                                <span t-field="o.state" />
                            </div>
                        </div>
                    </div>
                
                </div>
            </small>
            </div>
</div>

5
Avatar
Vazgeç
Shawn Varghese

Does this work everywhere on the report? This line seemed to display the page number only when it was placed in the external_layout_footer template.

Cliff Kujala

I am not using external_layout_footer in my Sales Order/Quote or Invoice Qweb report printouts. I instead have the header and footer written directly into the "document" Qweb views. My footer looks like this:

Page of
Shawn Varghese

Post it as an answer... that part supports markup

Gopakumar N G
Üretici

@Cliff Kujala Is it possible to add the header in all pages of the report?

Cliff Kujala

@ Gopakumar N G Yes this is possible. I will edit my answer above so you can see the code to add a header inside the "document" Qweb view.

Cliff Kujala

Are you viewing as PDF or HTML? It will only work as PDF. You also need to make sure you are calling out the class of the span tag correctly. See html/xml as written above. Anything that doesn't pass strict XML won't work.

Gopakumar N G
Üretici

@Cliff Kujala For getting the header in all pages of the report, the div with class="header"is to be added in which part of the report? Could you please provide your report file or post it in the answer?

Avatar
Vasanth
En İyi Yanıt

Try this in xml.view:

<template id="external_layout_footer">
    <div class="footer">
        <div class="text-center" style="border-top: 1px solid black;">        

            <ul class="list-inline">
                <li>Page:</li>
                <li><span class="page"/></li>
                <li>/</li>
                <li><span class="topage"/></li>
            </ul>
        </div>
    </div>     

</template>

5
Avatar
Vazgeç
Ankit H Gandhi(AHG)

Thanks @vasanth this code very helpfull for me

Alfa y Omega Pachuca

How i can img to footer, i have my own module but i can add images with the images do not show up.

Avatar
vishal
En İyi Yanıt

tell me without using external and internal layout'

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

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

Üye Ol
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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