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

Custom footer in report PDF

Odoberať

Get notified when there's activity on this post

This question has been flagged
odoo15reportPDF
1 Odpoveď
2198 Zobrazenia
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
Zrušiť
Avatar
Nikhil Nakrani
Best Answer

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
Zrušiť
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
Error install web_responsive in odoo 15
odoo15
Avatar
0
sep 24
1781
Create a button next to the chat one or activities
odoo15
Avatar
Avatar
1
jún 24
2176
I can't import reordering rules other company
odoo15
Avatar
Avatar
1
máj 24
2331
one2many search widget
odoo15
Avatar
Avatar
Avatar
Avatar
3
máj 24
2501
float_compare validation fails for standard_price in custom module due to decimal precision
Decimal-precision odoo15
Avatar
Avatar
Avatar
Avatar
3
sep 25
954
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