Skip to Content
Odoo Меню
  • Увійти
  • Спробуйте це безкоштовно
  • Додатки
    Фінанси
    • Бухоблік
    • Виставлення рахунку
    • Витрати
    • Електронні таблиці (BI)
    • Документи
    • Підпис
    Продажі
    • CRM
    • Продажі
    • POS Магазин
    • POS Ресторан
    • Підписки
    • Оренда
    Веб-сайти
    • Конструктор веб-сайту
    • Електронна комерція
    • Блог
    • Форум
    • Живий чат
    • Електронне навчання
    Ланцюг поставок
    • Склад
    • Виробництво
    • PLM
    • Купівлі
    • Технічне обслуговування
    • Якість
    Кадри
    • Співробітники
    • Рекрутинг
    • Відпустки
    • Оцінювання
    • Рекомендації
    • Автотранспорт
    Маркетинг
    • Маркетинг соцмереж
    • Email-маркетинг
    • SMS-маркетинг
    • Події
    • Автом. маркетингу
    • Опитування
    Послуги
    • Проект
    • Табелі
    • Виїзне обслуговування
    • Служба підтримки
    • Планування
    • Призначення
    Продуктивність
    • Обговорення
    • Схвалення
    • IoT
    • IP-телефонія
    • База знань
    • WhatsApp
    Сторонні модулі Odoo Studio Платформа Odoo Cloud
  • Сфери
    Роздрібна торгівля
    • Книжковий магазин
    • Магазин одягу
    • Магазин меблів
    • Продуктовий магазин
    • Магазин будівельних матеріалів
    • Магазин іграшок
    Food & Hospitality
    • Бар та паб
    • Ресторан
    • Фастфуд
    • Guest House
    • Дистриб'ютор напоїв
    • Hotel
    Нерухомість
    • Real Estate Agency
    • Архітектурна фірма
    • Будівництво
    • Управління нерухомістю
    • Садівництво
    • Асоціація власників нерухомості
    Консалтинг
    • Бухгалтерська компанія
    • Партнер Odoo
    • Агенція маркетингу
    • Юридична фірма
    • Придбання Талантів
    • Аудит та сертифікація
    Виробництво
    • Textile
    • Metal
    • Меблі
    • Їжа
    • Brewery
    • Корпоративні подарунки
    Здоров'я & Фітнес
    • Спортивний клуб
    • Оптика
    • Фітнес-центр
    • Практики здоров'я
    • Аптека
    • Салон краси
    Trades
    • Ремонтник
    • IT-обладнання та Підтримка
    • Системи сонячної енергії
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Інші
    • Nonprofit Organization
    • Екологічна агенція
    • Оренда білбордів
    • Фотографія
    • Лізинг велосипедів
    • Реселлер програмного забезпечення
    Browse all Industries
  • Спільнота
    Навчання
    • Навчальний посібник
    • Документація
    • Сертифікації
    • Тренування
    • Блог
    • Подкаст
    Сприяйте Освіті
    • Програма навчання
    • Бізнес гра Scale Up!
    • Відвідайте Odoo
    Отримайте програмне забезпечення
    • Завантаження
    • Порівняйте версії
    • Релізи
    Співпрацюйте
    • Github
    • Форум
    • Події
    • Переклади
    • Стати партнером
    • Services for Partners
    • Зареєструйте вашу бухгалтерську фірму
    Отримайте послуги
    • Знайдіть партнера
    • Знайдіть бухгалтера
    • Зустріньтеся з консультантом
    • Послуги з впровадження
    • Референси клієнтів
    • Підтримка
    • Оновлення
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Отримати демо
  • Ціни
  • Допомога

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

  • CRM
  • e-Commerce
  • Бухоблік
  • Склад
  • PoS
  • Проект
  • MRP
All apps
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Допомога

How to put company header only on the first page of a report?

Підписатися

Отримуйте сповіщення про активність щодо цієї публікації

Це запитання позначене
pdfqwebheaderreporting
3 Відповіді
13621 Переглядів
Аватар
Pascal Tremblay

Hello gang!

I have now beautifull qweb report in PDF. But if my reports (sale order, for example) have more than one page, the header is on EACH page. 

How to put company header only on the first page?

Thanks

1
Аватар
Відмінити
Pascal Tremblay
Автор

Somebody manage to do it? We still did not.

Pascal Tremblay
Автор

May be an idea : the pseudo class :first-of-type in CSS?

Аватар
Pascal Tremblay
Автор Найкраща відповідь

Ref :
        http://lolierp.blogspot.ca/2015/03/odoo-8-editions-qweb-suppression-entete.html?showComment=1430604942124

It works here. We are very happy of this!

Look image, header is only on the first page of the saleorder!!!! Great



If somebody needs XML code, it will be a pleasure to put it here. Just ask.


UPDATE 7 AUGUST 2015 - SOME CODES TO HELP!

<template id="report_lapagept.report_header_pt">

<!--Ici l'en-tête de La Page PT-->

<div class="row zero_min_height">

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

<div style="border-bottom: 3px solid #881111;" />

</div>

</div>

<div class="row" style="">

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

<span>&nbsp;</span>

<img t-if="user.company_id.logo" t-att-src="'data:image/png;base64,%s' % user.company_id.logo" style="max-height: 60px; margin-left: 5px; margin-top: 5px;" /> </div>

<div class="col-xs-9 text-right" style="padding-top: 20px;">

<span style="font-size: 20px;" t-field="user.company_id.rml_header1" />

<span>&nbsp;&nbsp;</span>

</div>

</div>

<div class="row zero_min_height">

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

<div style="margin-top: 5px; border-bottom: 3px ridge #222222;" />

</div>

</div>

<div class="row">

<div style="margin-top: 5px;" class="col-xs-4">

<div t-field="user.company_id.partner_id" t-field-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": true}" style="padding-left: 5px; padding-bottom: 5px; border-bottom: 3px solid #555544;" />

</div>

<div style="margin-top: 5px; font-size: 10px;" class="col-xs-4">

<div>TPS : 85890 5656 RT0001</div>

<div>TVQ : 1028299113 TQ0002</div>

<div>TVD : 858905656 MT0001</div>

</div>

<div style="margin-top: 5px; font-size: 11px;" class="col-xs-4">

<div>NE : 858905656</div>

<div>NEQ : 2265894800</div>

</div>

</div>

</template>

 

<template id="report_saleorder_document_lapagept" inherit_id="sale.report_saleorder_document">

<xpath expr="//div[@class='page']" position="replace">

<div style="font-family: Ubuntu;" class="page">

<div t-if="user.company_id.x_company_prefix == 'AS'">

<t t-call="report_lapagept.report_header_as" />

</div>

<div t-if="user.company_id.x_company_prefix == 'PT'">

<t t-call="report_lapagept.report_header_pt" />

</div>

<div t-if="user.company_id.x_company_prefix == 'IV'">

<t t-call="report_lapagept.report_header_iv" />

</div>

<div class="oe_structure"/>

<div class="row">

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

<h4>

<strong t-if="o.partner_shipping_id == o.partner_invoice_id">Invoice and shipping address :</strong>

<strong t-if="o.partner_shipping_id != o.partner_invoice_id">Invoice address :</strong></h4>

<div style="margin-left: 20px;">

<div t-field="o.partner_invoice_id" t-field-options="{"widget": "contact","fields": ["address", "name", "phone", "fax"], "no_marker": true}"/>

<p t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat"/></p>

</div>

</div>

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

<div t-if="o.partner_shipping_id != o.partner_invoice_id" class="mt8">

<h4><strong>Shipping address :</strong></h4>

<div style="margin-left: 20px;">

<div t-field="o.partner_shipping_id" t-field-options="{"widget": "contact", "fields":

["address", "name", "phone", "fax"], "no_marker": true }"/>

<p t-if="o.partner_id.vat">VAT : <span t-field="o.partner_id.vat"/></p>

</div>

</div>

</div>

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

<h4><strong>Partner address : </strong></h4>

<div style="margin-left: 20px;">

<div t-field="o.partner_id" t-field-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": true}"/>

</div>

</div>

</div>

 

<h1>

<span t-if="o.state not in ['draft','sent']">Order : N° </span>

<span t-if="o.state in ['draft','sent']">Quotation : N° </span>

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

</h1>

<div class="row mt32 mb32" id="informations">

<div t-if="o.client_order_ref" class="col-xs-3">

<strong>Your reference :</strong>

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

</div>

<div t-if="o.date_order" class="col-xs-3">

<strong t-if="o.state not in ['draft','sent']">Date ordered :</strong>

<strong t-if="o.state in ['draft','sent']">Quotation date :</strong>

<div style="margin-left: 6px;">

<p t-field="o.date_order" t-field-options='{"format": "d MMMM y"}'/> </div>

</div>

<div t-if="o.user_id.name" class="col-xs-3">

<strong>Salesperson :</strong>

<div style="margin-left: 6px;">

<p t-field="o.user_id.name"/></div>

</div>

<div t-if="o.payment_term" class="col-xs-3">

<strong>Payment term :</strong>

<div style="margin-left: 6px;"><p t-field="o.payment_term"/></div>

</div>

</div>

<table class="table table-condensed">

<thead>

<tr>

<th> Picture</th>

<th>Name</th>

<th>Description</th>

<th>Taxes</th>

<th class="text-right">Quantity</th>

<th class="text-right">Unit price</th>

<th groups="sale.group_discount_per_so_line">Discount (%)</th>

<th class="text-right">Price</th>

</tr>

</thead>

<tbody class="sale_tbody">

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

<td>

<span t-field="l.product_id.image_small" t-field-options="{"widget": "image", "height": "64"}" />

</td>

<td>

<span t-field="l.product_id.name"/>

</td>

<td>

<span t-field="l.name"/>

</td>

<td>

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

</td>

<td class="text-right">

<span t-field="l.product_uom_qty"/>

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

</td>

<td class="text-right">

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

</td>

<td groups="sale.group_discount_per_so_line">

<span t-field="l.discount"/>

</td>

<td class="text-right">

<span t-field="l.price_subtotal" t-field-options="{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}"/>

</td>

</tr>

</tbody>

</table>

<div class="row">

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

<table class="table table-condensed">

<tr class="border-black">

<td><strong>Total without taxes</strong></td>

<td class="text-right">

<span t-field="o.amount_untaxed" t-field-options="{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}"/>

</td>

</tr>

<tr>

<td>Taxes</td>

<td class="text-right">

<span t-field="o.amount_tax" t-field-options="{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}"/>

</td>

</tr>

<tr class="border-black">

<td><strong>Total</strong></td>

<td class="text-right">

<span t-field="o.amount_total" t-field-options="{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}"/>

</td>

</tr>

</table>

</div>

</div>

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

<p t-if="o.payment_term.note">

<strong>Payment Term:</strong>

<span t-field="o.payment_term.note"/>

</p>

<div class="oe_structure"/>

</div>

</xpath>

</template>

</data>



0
Аватар
Відмінити
Aiden Andrews-McDermott

Any chance you could post other sample reports?

Pascal Tremblay
Автор

Just say to me what you would want to see. No prob.

Erhuvwu Akpobaro

Hey Pascal is it possible to see some sample xml code ?

Enjoying the discussion? Don't just read, join in!

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

Реєстрація
Related Posts Відповіді Переглядів Дія
Qweb pdf: print a last page horizontaly (landcape)
pdf qweb reporting
Аватар
0
черв. 20
3232
v10 custom reports module header
qweb header reporting
Аватар
Аватар
2
трав. 17
4703
QWEB Report issue while having large row content. Вирішено
qweb header reporting wkhtmltopdf
Аватар
Аватар
Аватар
2
черв. 22
8732
Odoo v8: How can old .rml header be embedded in custom qweb report?
qweb rml header reporting
Аватар
Аватар
2
лип. 15
4334
How can I display all tasks (including completed ones) in a QWeb report in Odoo?
qweb reporting
Аватар
Аватар
2
вер. 24
3069
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
Open Source
  • Завантаження
  • Github
  • Runbot
  • Переклади
Послуги
  • Хостинг Odoo.sh
  • Підтримка
  • Оновлення
  • Кастомні доробки
  • Навчання
  • Знайдіть бухгалтера
  • Знайдіть партнера
  • Стати партнером
Про нас
  • Наша компанія
  • Торгові активи
  • Зв'яжіться з нами
  • Вакансії
  • Події
  • Подкаст
  • Блог
  • Клієнти
  • Юридичні документи • Конфіденційність
  • Безпека
الْعَرَبيّة 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 - це набір програм для роботи з відкритим кодом, які охоплюють всі ваші потреби компанії: CRM, електронна комерція, бухгалтерський облік, склад, точка продажу, управління проектами тощо.

Унікальна пропозиція Odoo - це одночасно дуже проста у використанні та повністю інтегрована.

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