Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

Headers and Footers don't appears on reports after customization

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
3 Odpowiedzi
8125 Widoki
Awatar
Ben

Hello everyone,

I am customizing some reports in Odoo but I have encountered a problem for some time that I can not find the solution.

In fact, on all my reports the footers do not appear and the header appears only on the first page and not on the rest, I tried several solutions that I found on the net but without success.

I work on odoo 11 Enterprise version, Ubuntu 16.04, wkhtmltopdf 0.12.2.4-1, wkhtmltox 0.12.1.

Thank you for helping me

0
Awatar
Odrzuć
Awatar
Ben
Autor Najlepsza odpowiedź

Hello Daniel John,

here is my code, hope it will help you

<?xml version="1.0" encoding="utf-8"?>

<odoo>

<!-- Format paper -->

<record id="paperformat_purchasepo_radiocom" model="report.paperformat">

<field name="name">European A4 Purchase PO Radiocom</field>

<!--field name="default" eval="True"/-->

<field name="format">A4</field>

<field name="page_height">0</field>

<field name="page_width">0</field>

<field name="orientation">Portrait</field>

<field name="margin_top">1</field>

<field name="margin_bottom">29</field>

<field name="margin_left">7</field>

<field name="margin_right">7</field>

<field name="header_line" eval="False"/>

<field name="header_spacing">10</field>

<field name="dpi">90</field>

</record>

<!-- Private templates used internally by reports -->

<!-- LAYOUT -->

<template id="layout" name="Report layout">&lt;!DOCTYPE html&gt;

<html t-att-lang="lang and lang.replace('_', '-')"

t-att-data-editable="'1' if editable else None"

t-att-data-translatable="'1' if translatable else None"

t-att-data-edit_translations="'1' if edit_translations else None"

t-att-data-main-object="repr(main_object) if editable else None"

t-att-data-report-margin-top="data_report_margin_top"

t-att-data-report-header-spacing="data_report_header_spacing"

t-att-data-report-dpi="data_report_dpi">

<head>

<meta charset="utf-8" />

<meta name="viewport" content="initial-scale=1"/>

<title><t t-esc="title or 'Odoo Report'"/></title>

<!--t t-call-assets="report.assets_common"/>

<t t-if="editable">

<t t-call-assets="web_editor.assets_editor"/>

<t t-call-assets="report.assets_editor"/>

</t-->

</head>

<body class="container" t-att-style="editable and 'margin-top: 40px;'">

<div id="wrapwrap">

<main>

<t t-raw="0"/>

</main>

</div>

</body>

</html>

</template>

<!-- HTML CONTAINER -->

<template id="html_container">

<t t-set="body_classname" t-value="'container'"/>

<t t-call="purchase_customize.layout">

<t t-raw="0"/>

</t>

</template>

<!-- EXTERNAL LAYOUT -->

<template id="external_layout">

<!-- Multicompany -->

<t t-if="o and 'company_id' in o">

<t t-set="company" t-value="o.company_id"></t>

</t>

<t t-if="not o or not 'company_id' in o">

<t t-set="company" t-value="res_company"></t>

</t>

<!--t t-call="purchase_customize.external_layout_header" /-->

<div class="article o_report_layout_boxed">

<t t-raw="0" />

</div>

<t t-call="purchase_customize.external_layout_footer" />

</template>

<!-- FOOTER -->

<template id="external_layout_footer">

<div class="footer">

<div class="text-center" style="border-top:1px dotted #000000">

<ul class="list-inline mb4">

<li t-if="company.street"><span t-field="company.street"/></li>

</ul>

<ul class="list-inline mb4">

<li t-if="company.phone">Phone: <span t-field="company.phone"/></li>

<li t-if="company.email">Email: <span t-field="company.email"/></li>

<li t-if="company.website">Web: <span t-field="company.website"/></li>

<li t-if="company.vat"><t t-esc="company.country_id.vat_label or 'TIN'"/>: <span t-field="company.vat"/></li>

</ul>

<div name="financial_infos">

<span t-field="company.report_footer"/>

</div>

<div class="text-muted">

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

</div>

</div>

</div>

</template>

<report

string="Purchase Order"

id="action_report_purchase_order_an"

model="purchase.order"

report_type="qweb-pdf"

name="purchase_customize.report_purchaseorderan_customise"

file="purchase_customize.report_purchaseorderan_customise"

paperformat="purchase_customize.paperformat_purchasepo_radiocom"

print_report_name="

(object.state in ('draft', 'sent') and 'Request for Quotation - %s' % (object.name) or

'English Purchase Order - %s' % (object.name))"

/>

<!-- Purchase Order Anglais -->

<template id="report_purchaseorderan_document_customise">

<t t-call="purchase_customize.external_layout">

<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})"/>

<style type="text/css">

header{

height:10px;

}

.page{

font-size:16px !important;

color:#000000 !important;

font-family: Arial, Helvetica, sans-serif !important;

}

#contenant{

font-size:16px !important;

}

.table tr td{

color:#000000 !important;

}

#tabheader tr td{

color:#000000 !important;

}

</style>

<div class="header">

</div>

<div class="page" width="150%" id="contenant">

<table class="table table-condensed" border-collapse="0px;" style="height:1200px;">

<thead>

<tr>

<td t-att-colspan="6" style="border:1px solid #ffffff !important;border-bottom:2px solid #1d0296 !important;">

<center>

<img t-if="o.company_id.logo" t-att-src="'data:image/png;base64,%s' % to_text(o.company_id.logo)" style="height: 75px;" width="400px"/>

</center>

</td>

</tr>

<tr>

<th class="text-left" t-att-colspan="3" style="border:1px solid #ffffff !important;padding-top:3px !important;vertical-align:top;">

<br/><strong></strong>

<strong><span t-field="o.company_id.partner_id"

t-options='{"widget": "contact", "fields": ["name"], "no_marker": True}'/>

</strong>

<ul class="list-block" style="list-style-type: none !important;font-weight:normal !important;">

<li><span t-field="o.company_id.street"/></li>

<li><span t-field="o.company_id.street2"/>, <span t-field="o.company_id.city"/>,

<span t-field="o.company_id.country_id"/></li>

<li>Tel.: <span t-field="o.company_id.phone"/></li>

<li>CD/KIN/RCCM/14-B-3454, ID.NAT.01-73-N 32550 T Numero Impot: A0700120P</li>

</ul>

</th>

<th class="text-left" t-att-colspan="3" style="border:1px solid #ffffff !important;padding-top:3px !important;vertical-align:top;">

<strong>Supplier:</strong>

<br/><span t-field="o.partner_id"

t-options='{"widget": "contact", "fields": ["name"], "no_marker": True}'/>

<ul class="list-block" style="list-style-type: none !important;font-weight:normal !important;">

<li><span t-field="o.partner_id.street"/></li>

<li><span t-field="o.partner_id.street2"/>, <span t-field="o.partner_id.city"/>,

<span t-field="o.partner_id.country_id"/></li>

<li>Tel.: <span t-field="o.partner_id.mobile"/></li>

</ul>

</th>

</tr>

<tr>

<th class="text-left" t-att-colspan="6" style="border:1px solid #ffffff !important;">

<p>Shipping address:</p>

</th>

</tr>

<tr>

<th class="text-left" t-att-colspan="6" style="border:1px solid #ffffff !important;">

<center>

<h3> Purchase Order Confirmation No. - : <span t-field="o.name"/></h3>

</center>

</th>

</tr>

<tr>

<th class="text-center" style="border:1px solid #ffffff !important;border-bottom:1px solid #000000 !important;">

<span><strong style="padding:2px;text-align:center;">Our Order Reference:</strong><br/><p style="font-weight:normal !important;" t-field="o.name"/></span>

</th>

<th class="text-center" style="border:1px solid #ffffff !important;border-bottom:1px solid #000000 !important;" t-att-colspan="3">

<span><strong style="padding:2px;">our Order Reference:</strong><br/><p style="font-weight:normal !important;" t-field="o.partner_ref"/></span>

</th>

<th class="text-center" style="border:1px solid #ffffff !important;border-bottom:1px solid #000000 !important;" t-att-colspan="2">

<span><strong style="padding:2px;">Order Date:</strong>

<p style="font-weight:normal !important; text-align:center;" t-field="o.date_order" t-field-options='{"format": "d/M/y"}'/></span>

</th>

</tr>

<tr>

<th class="text-center" style="border:1px solid #000000 !important;">Description</th>

<th class="text-center" style="border:1px solid #000000 !important;">Date Req. </th>

<th class="text-center" style="border:1px solid #000000 !important;">Qty</th>

<th class="text-center" style="border:1px solid #000000 !important;">Unit Price</th>

<th class="text-center" style="border:1px solid #000000 !important;">Taxes</th>

<th class="text-center" style="border:1px solid #000000 !important;">Amount</th>

</tr>

</thead>

<tbody>

<tr t-foreach="o.order_line" t-as="line">

<td>

<strong><span t-field="line.name"/></strong>

</td>

<td class="text-center">

<span t-field="line.date_planned" t-field-options='{"format": "d/M/y"}'/>

</td>

<td class="text-right">

<span t-field="line.product_qty"/>

<span t-field="line.product_uom.name" groups="product.group_uom"/>

</td>

<td class="text-right">

<span t-field="line.price_unit"/>

</td>

<td>

<span t-esc="', '.join(map(lambda x: x.name, line.taxes_id))"/>

</td>

<td class="text-right" style="background-color: transparent !important;">

<span t-field="line.price_subtotal"

t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>

</td>

</tr>

</tbody>

<tbody>

<tr>

<td t-att-colspan="6" style="background-color: transparent !important;">

<table width="100%">

<tr>

<td style="border:1px solid #ffffff;" width="65%">

<p style="padding:5px"><strong>Amount in Word: </strong>

<span t-field="o.amount_letter"/></p>

</td>

<td style="background-color: transparent !important;border:1px solid #ffffff;" width="35%">

<table class="table table-condensed" style="min-width:200px;max-width: 350px;">

<tr>

<td class="text-left" style="border:1px solid #000000 !important;"><strong>Subtotal</strong></td>

<td class="text-right" style="background-color: transparent !important;border:1px solid #000000 !important;">

<span t-field="o.amount_untaxed"

t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>

</td>

</tr>

<tr>

<td>Taxes</td>

<td class="text-right" style="background-color: transparent !important;border:1px solid #000000 !important;">

<span t-field="o.amount_tax"

t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>

</td>

</tr>

<tr>

<td style="background-color: transparent !important;border:1px solid #000000 !important;"><strong>Total</strong></td>

<td class="text-right" style="background-color: transparent !important;border:1px solid #000000 !important;">

<span t-field="o.amount_total"

t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>

</td>

</tr>

</table>

</td>

</tr>

</table>

</td>

</tr>

</tbody>

<tfooter style="border:1px solid #ffffff !important;">

<tr>

<td t-att-colspan="6" style="background-color: transparent !important;">

<p style="text-align:left;">Select please</p>

<div class="col-xs-12">

<div class="col-xs-8">

<div class="col-xs-3">

<strong>ETA:</strong><br/>

<span>Date:</span>

<p t-field="o.date1" t-field-options='{"format": "d/M/y"}'/>

</div>

<div class="col-xs-3">

<strong>Transport:</strong><br/>

<span>By Air:</span>

<p t-field="o.byair"/>

</div>

<div class="col-xs-2">

<strong>Inspection:</strong><br/>

<span>Yes:</span>

<p t-field="o.yes"/>

</div>

</div>

<div class="col-xs-4">

<p style="padding:5px;text-align:right"><strong>

<em>Stamp &amp; Signature</em>

</strong></p>

</div>

<div class="col-xs-8" style="float:left;">

<div class="col-xs-3">

<span>Date:</span>

<p t-field="o.date1" t-field-options='{"format": "d/M/y"}'/>

</div>

<div class="col-xs-3">

<span>By Sea:</span>

<p t-field="o.bysea"/>

</div>

<div class="col-xs-2">

<span>No:</span>

<p t-field="o.yes"/>

</div>

</div>

<div class="col-xs-4">

<p style="padding:5px;text-align:right"/>

</div>

<div class="col-xs-8" style="float:left;padding-left:20px;">

<p style="padding:5px;text-align:left">

<strong>Forwarder name:</strong>

<span t-field="o.forwarder"/>

<br/><br/>

</p>

</div>

<div class="col-xs-4">

<p style="padding:5px;text-align:right">

<strong>Order Approved</strong>

<br/><br/>

</p>

</div>

</div>

<p t-field="o.notes"/>

</td>

</tr>

</tfooter>

</table>

<div class="oe_structure"/>

</div>

</t>

</template>

<template id="report_purchaseorderan_customise">

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

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

<t t-call="purchase_customize.report_purchaseorderan_document_customise" t-lang="o.partner_id.lang"/>

</t>

</t>

</template>

</odoo>

0
Awatar
Odrzuć
Awatar
Manish Bohra
Najlepsza odpowiedź

Hello ,

Call external layout i hope it's help you .

<template id="Sales.report_xyz_document">

<t t-call="report.external_layout">

Inside your code

</t>

</template>

0
Awatar
Odrzuć
Awatar
Dan Support
Najlepsza odpowiedź

Provide your code so we can have a look to provide help

0
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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