Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Custom footer in report PDF

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
odoo15reportPDF
1 Répondre
2204 Vues
Avatar
Aprilia Zahratunnisa

I want to make the footer at the bottom of the page, but always below the table...



<odoo>

    <template id="report_penyerahan_barang_template">

        <t t-call="web.html_container">

            <style type="text/css">

                .page {

                    position: relative;

                    width: 100%;

                    page-break-before: auto;

                }


                /* Memaksa halaman kedua dan seterusnya untuk dimulai dari halaman baru */

                .page:nth-of-type(n+2) {

                    page-break-before: always;

                }


                .header {

                    width: 100%;

                }


                .header td p {

                    margin: 0;

                }


                .footer {

                    position: fixed;

                    bottom: 0;

                }


                h2 {

                    margin: 0;

                }


                .table {

                    border-collapse: collapse;

                    width: 100%;

                    border: solid;

                    border-width: 1px;

                }


                .table th, .table td {

                    padding: 0px;

                    border: solid;

                    border-width: 1px;

                }


                .table-wrapper {

                    max-height: calc(9 * 3px);

                    border: 1px solid #ccc;

                }


                .table-collapse td {

                    font-size: 14px;

                }


                .td p {

                    margin: 0;

                }

            </style>


            <t t-foreach="docs" t-as="picking">

                <t t-set="items_per_page" t-value="8"/>

                <t t-set="total_items" t-value="len(picking.move_lines)"/>

                <t t-set="page_count" t-value="(total_items + items_per_page - 1) // items_per_page"/>

                <t t-set="move_lines" t-value="picking.move_line_ids.filtered(lambda l: l.qty_done > 0).sorted(lambda l: l.product_id.default_code or '')"/>

                <t t-set="total_moves" t-value="len(move_lines)"/>

                <t t-set="chunks" t-value="[]"/>

                <t t-set="page_idx" t-value="0"/>


                <t t-foreach="range(0, total_moves, items_per_page)" t-as="i">

                    <t t-set="chunks" t-value="chunks + [move_lines[i:i + items_per_page]]"/>

                </t>


                <t t-foreach="chunks" t-as="chunk">

                    <div class="page">

                        <br/>

                        <br/>

                        <br/>

                        <header>

                            <h2 style="text-align: center;">SURAT PENYERAHAN BARANG</h2>

                            <table style="margin-top: 3px;" class="header">

                                <tr>

                                    <td style="font-size: 14px; width: 73%;">

                                        <p>

                                            <strong>Kepada Yth:</strong>

                                            <t t-esc="picking.sale_id.partner_invoice_id.name"/>

                                        </p>

                                        <p style="margin-bottom: 3px; min-height: 20px;">

                                            <t t-esc="picking.sale_id.partner_invoice_id.street"/>

                                        </p>

                                        <p>

                                            <strong>Diserahkan Kepada:</strong>

                                            <t t-esc="picking.partner_id.name"/>

                                        </p>

                                        <p style="margin-bottom: 2px; min-height: 20px;">

                                            <t t-esc="picking.partner_id.street"/>

                                        </p>

                                        <p>

                                            <strong>No. PO:</strong>

                                            <t t-esc="picking.sale_id.reference_po"/>

                                        </p>

                                    </td>

                                    <td style="font-size: 15px; width: 14%;">

                                        <p>No. SPB</p>

                                        <p>Tgl SPB</p>

                                        <p>Nama Ekspedisi</p>

                                        <p>No Kendaraan</p>

                                    </td>

                                    <td style="font-size: 16px; width: 1%;">

                                        <p>: </p>

                                        <p>: </p>

                                        <p>: </p>

                                        <p>: </p>

                                    </td>

                                    <td style="font-size: 15px; width: 12%;">

                                        <t t-set="page_idx" t-value="page_idx or 0"/>

                                        <p>Hal: <t t-esc="page_idx + 1"/> / <t t-esc="page_count"/></p>

                                        <p><t t-esc="picking.name"/></p>

                                        <p style="margin-bottom: 50%;"> <t t-esc="datetime.datetime.now().strftime('%d-%m-%Y')"/> </p>

                                    </td>

                                </tr>

                            </table>

                        </header>

                        <section>

                            <!-- Bungkus tabel dalam div untuk max-height -->

                            <div class="table-wrapper">

                                <table class="table">

                                    <thead>

                                        <tr>

                                            <th>No</th>

                                            <th>Kuantitas</th>

                                            <th>Kode Barang</th>

                                            <th>Nama Barang</th>

                                            <th>No. SO</th>

                                        </tr>

                                    </thead>

                                    <tbody>

                                        <t t-set="counter" t-value="1 + page_idx * items_per_page"/>

                                        <t t-foreach="chunk" t-as="move_line">

                                            <tr>

                                                <td style="text-align: center; width: 4%; font-size: 16px;">

                                                    <t t-esc="counter"/>

                                                    <t t-set="counter" t-value="counter + 1"/>

                                                </td>

                                                <td style="text-align: center; font-size: 12px;">

                                                    <table style="width: 100%; border: none;">

                                                        <tr>

                                                            <td style="text-align: left; border: none;">

                                                                <t t-esc="int(move_line.qty_done)"/> EA

                                                            </td>

                                                            <td style="text-align: right; border: none;">

                                                                <t t-esc="move_line.product_id.default_code.split('-', 2)[-1]"/>

                                                            </td>

                                                        </tr>

                                                    </table>

                                                </td>

                                                <td style="text-align: left; width: 20%; font-size: 16px;">

                                                    <t t-if="move_line.product_id.default_code">

                                                        <t t-esc="move_line.product_id.default_code"/>

                                                    </t>

                                                    <t t-else="">N.A</t>

                                                </td>

                                                <td style="width: 43%; font-size: 16px;">

                                                    <t t-esc="move_line.product_id.name"/>

                                                </td>

                                                <td style="text-align: center; width: 16%; font-size: 16px;">

                                                    <t t-esc="picking.sale_id.name"/>

                                                </td>

                                            </tr>

                                        </t>

                                    </tbody>

                                </table>

                            </div>

                        </section>

                        <footer>

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

                                <tr>

                                    <td class="td" style="width: 40%; text-align: left;font-size: 14px;">

                                        <p>Diterima Oleh :</p>

                                        <p style="margin-bottom: 100px;">(Pembeli)</p>

                                        <p>Nama</p>

                                        <p>Tgl.</p>

                                    </td>

                                    <td class="td" style="width: 35%; text-align: left; font-size: 14px;">

                                        <p>Diserahkan Oleh :</p>

                                        <p style="margin-bottom: 100px; margin-top: 0;">(Kepala Gudang)</p>

                                        <p>Nama</p>

                                        <p style="margin-top: 0;">Tgl.</p>

                                    </td>

                                    <td class="td" style="width: 35%; text-align: left; font-size: 14px;">

                                        <p>Dibuat Oleh :</p>

                                        <p style="margin-bottom: 100px; margin-top: 0;">(Adm. Penjualan)</p>

                                        <p>Nama</p>

                                        <p style="margin-top: 0;">Tgl.</p>

                                    </td>

                                </tr>

                            </table>

                        </footer>

                        <t t-set="page_idx" t-value="page_idx + 1"/>

                    </div>

                </t>

            </t>

        </t>

    </template>

</odoo>



0
Avatar
Ignorer
Avatar
Nikhil Nakrani
Meilleure réponse

Hi,

I hope you are doing well,

<div t-attf-class="footer o_standard_footer o_company_#{company.id}_layout">
<!-- <div class="text-center" style="background-color: #15003d;font-size:13px;padding-botton:0px;"> -->
<div class="text-center">
<ul class="list-inline mb4">
<div t-field="company.report_footer"/>
<table class="table table-sm table-striped" style="zoom:75%;">
<tbody>
<tr>
<td colspan="2">
<center>Your content</center>
</td>
</tr>
<tr>
<td colspan="2">
<center>This is a Computer Generated Invoice
</center>
</td>
</tr>
</tbody>
</table>
</ul>
<div t-if="report_type == 'pdf'" class="text-muted">
<strong>TAX INVOICE (Page
<span class="page"/>)
</strong>
</div>
</div>
</div>

Can you try above code This is Odoo by deafult use.

You can user this class in your footer tag.

footer at the bottom of the page and always below after body content.

Thanks.

0
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Error install web_responsive in odoo 15
odoo15
Avatar
0
sept. 24
1782
Create a button next to the chat one or activities
odoo15
Avatar
Avatar
1
juin 24
2182
I can't import reordering rules other company
odoo15
Avatar
Avatar
1
mai 24
2337
one2many search widget
odoo15
Avatar
Avatar
Avatar
Avatar
3
mai 24
2508
float_compare validation fails for standard_price in custom module due to decimal precision
Decimal-precision odoo15
Avatar
Avatar
Avatar
Avatar
3
sept. 25
957
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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