Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

Override default QWEB template - not part of it but all content

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
invoiceqwebtemplatesquotationsale.order
2 Replies
9039 Rodiniai
Portretas
Matija

Hi, I need to create custom template for Quotations/Invoices and inheriting parts of it is not option - I need to inherit all of its contents and replace it with customised content. 

I'm working on template report_saleorder_document

I tried to do it like this:

In my custom module in folder report I created sale_order_report_inherited.xml in which I put this code (only upper part of it is in screenshot) - see screenshot here https://ibb.co/5xWFnGw

I added that file in manifest.py and added 'sale' in depends. When I try to change some text in this template nothing changes on quotation pdf - what am I doing wrong - how to inherit entire template? Thank you!

0
Portretas
Atmesti
Portretas
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

You can achieve this in two ways. Either you can inherit the report_saleorder_document and replace it from the < t t-call web.external_layout> using xpath.

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


    <xpath expr="//t[@t-call='web.external_layout'" position="replace">


        <t t-call="web.externale_layout>


            ---- Your Codes----


        </t>


    </xpath>


</template>


Or, you can call your custom template where the report_saleorder_document is being called. For that, create a custom temlplate, and where t-call for report_saleorder_document is happening, replace it using xpath and call your newly created template.

Regards

1
Portretas
Atmesti
Portretas
Ashish Hirpara
Best Answer

To inherit an entire template in Odoo, you need to create a new XML file with the same structure as the original template. Then, you can copy the contents of the original template into your new XML file and modify it as needed.

Here is an example of how you could inherit the report_saleorder_document template:

  1. Create a new XML file in your custom module, for example my_module/views/report_saleorder_document_inherited.xml
  2. In this new XML file, create a new template that extends the original report_saleorder_document template. This is done using the t-extend attribute:
id="report_saleorder_document_inherited" inherit_id="sale.report_saleorder_document">
    ...

  1. Inside this new template, you can now copy the entire contents of the original report_saleorder_document template and modify it as needed.

  2. In your module's __manifest__.py file, make sure to add the sale module to the depends list, as well as the new XML file you created to the data list:

'depends': ['sale'],
'data': [
    'views/report_saleorder_document_inherited.xml',
],
  1. Finally, you need to tell Odoo to use your new template instead of the original one. You can do this by adding a report_saleorder_document_inherited entry to the ir.actions.report.xml_id dictionary in your __manifest__.py file:
'ir.actions.report.xml_id': [
    ('report_saleorder_document', 'my_module.report_saleorder_document_inherited'),
],

After installing your module, the system should now use your custom template for quotations and invoices instead of the original one. Note that you may need to clear the cache and restart the server for the changes to take effect.

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

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

Registracija
Related Posts Replies Rodiniai Veikla
Custom Invoice Report
invoice qweb templates
Portretas
0
saus. 24
2385
Custom Invoice PDF template
invoice qweb templates replace
Portretas
1
gruod. 23
2572
How to hide "discount" columns on saleorders/invoices if there are none? Solved
invoice discount qweb sale.order
Portretas
Portretas
2
gruod. 22
9687
Edit invoice template in Odoo 8
invoice templates printing quotation
Portretas
Portretas
3
birž. 17
4603
Print Invoice with 10 lines per pages Solved
python invoice qweb print templates
Portretas
Portretas
2
spal. 19
9548
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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