Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Use custom header in qweb odoo 11

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
4 Răspunsuri
20545 Vizualizări
Imagine profil
bjr

Hello everyone,

In odoo 11 I''d like to use a custom header for each document 

<template id="templ_id">
<t t-call="web.html_container">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})"/>
<div class="page">

<div class="header">
my header
</div>
.......................

This code gets the default odoo header.

What shuld I do to get my own header?

Thanks

0
Imagine profil
Abandonează
Imagine profil
Rishan Malaka
Cel mai bun răspuns

Hi,

Don't use web.external_layout and replace it with <t t-call="web.internal_layout">. after that follow bellow steps and comment out the default internal layout details.

Settings -> Technical -> Views -> Go to the internal_layout

and comment bellow code segment.


Then you can define your custom header on your header tag.


Cheers!  

1
Imagine profil
Abandonează
bjr
Autor

But this solution it will apply also for other documents that call internal layout.

For each document I should define a header.

Thanks

Imagine profil
HIREN DANGAR
Cel mai bun răspuns

Hello bjr Please try below code I'm 100% sure this code is working for you.
You can create your custom Header and Footer as par your requirement but don't forget to use this way.

First custom header template :- 

<template id="custom_my_layout_footer">

            <div class="footer">

                <div class="text-center">

                    <ul class="list-inline">

                        <li class="col-xs-2" style="background-color:rgba(31, 32, 65, 1);color:#fff;">Printed By:-</li>

                        <li class="col-xs-7" style="text-align:center;background-color:rgba(31, 32, 65, 1);color:#fff;">

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

                        </li>

                        <li class="col-xs-3" style="background-color:rgba(31, 32, 65, 1);color:#fff;">

                            <span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M:%S')"/>

                        </li>

                    </ul>

                </div>

            </div>

        </template>

Custom footer template:-

<template id="partner_external_footer">

            <div class="footer">

                <div class="footer">

                    <strong>

                        This is computer generated invoice no signature required.

                    </strong>

                </div>

            </div>

        </template>


Second create main external template and call above temple into this template :- 

<template id="jt_report_external_layout">

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

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

            </t>

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

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

            </t>

            <div class="article">

                <t t-call="jt_my_invoice_report.custom_layout_header_my"/>

                <t t-raw="0"/>

                <t t-call="jt_my_invoice_report.custom_my_layout_footer"/>

            </div>

        </template>

Last point :-    Use this jt_report_external_layout template into your main report template after the <t t-call="web.html_container"> of any report template.    


 <template id="jt_my_account_report_invoice_document1">

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

                <t t-call="jt_my_invoice_report.jt_report_external_layout">


1
Imagine profil
Abandonează
Imagine profil
Sehrish
Cel mai bun răspuns

Try this one:

    <template id="report_student_on_probation">
          <t t-call="report.layout">
            <div class="page">
                <div class="text-center">
                    <h4><b>Hello This is Custom Report (Odoo QWEB)</b></h4>
                </div>
           </div>
           </t>
 </template>


1
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

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

Înscrie-te
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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