Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Headers and Footers don't appears on reports after customization

Odebírat

Get notified when there's activity on this post

This question has been flagged
3 Odpovědi
8129 Zobrazení
Avatar
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
Avatar
Zrušit
Avatar
Ben
Autor Nejlepší odpověď

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
Avatar
Zrušit
Avatar
Manish Bohra
Nejlepší odpověď

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
Avatar
Zrušit
Avatar
Dan Support
Nejlepší odpověď

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

0
Avatar
Zrušit
Enjoying the discussion? Don't just read, join in!

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

Přihlásit se
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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