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í
    Food & Hospitality
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Guest House
    • Distributor nápojů
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Trades
    • Údržbář
    • IT hardware a podpora
    • Solar Energy Systems
    • Výrobce obuvi
    • Úklidové služby
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • 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
    • Services for Partners
    • 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

Edit the qweb template with a custom modul.

Odebírat

Get notified when there's activity on this post

This question has been flagged
v8qwebreport
3 Odpovědi
18849 Zobrazení
Avatar
Artur Bertram

Could anybody tell me how to edit the qweb templat for the purchase order with a custom modul. I already tried it, but it doesent work and no error is given. If I add an id to the template it even shows under the associated QWeb views of Purchase Order.

__openerp__.py

{
    'name': 'report test',
    'version': '1.0',
    'category': 'test',
    'summary': 'test',
    'description': """
    test
    """,
    'author': 'test',
    'website': 'test',
    'depends': ['sales_team','account_voucher', 'procurement', 'report'],
    'data': [
        'views/report_purchase_extend.xml',
    ],
    'demo': [],
    'installable': True,
    'auto_install': False,
    'application': True,
}

views/report_purchase_extend.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template>
    <tr t-extend="purchase.report_purchaseorder">
        <t t-jquery="div.page" t-operation="replace">
                <t t-foreach="docs" t-as="o"/>
            <div class ="page">
            </div>
        </t>
    </tr>
</template>
</data>
</openerp>

and an empty __init__.py file.

1
Avatar
Zrušit
Alex

I have the same problem. No install error but nothing changes in template. Take a look to my post too, because maybe someone could give us a solution there. https://www.odoo.com/forum/Help-1/question/Inherit-Qweb-54163

Avatar
Artur Bertram
Autor Nejlepší odpověď

I solved it with the following code.

__openerp__.py

{
    'name': 'report test',
    'version': '1.0',
    'category': 'test',
    'summary': 'test',
    'description': """
    test
    """,
    'author': 'test',
    'website': 'test',
    'depends': ['base_setup', 'purchase', 'report'],
    'data': [
        'views/report_purchase_extend.xml',
    ],
    'demo': [],
    'installable': True,
    'auto_install': False,
    'application': True,
}

views/report_purchase_extend.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <template id="report_purchaseorder_extend" inherit_id="purchase.report_purchaseorder">
            <xpath expr="//div[@class='page']" position="replace">
                <div class ="page">
                </div>
            </xpath>
        </template>
    </data>
</openerp>

and an empty __init__.py file.

0
Avatar
Zrušit
Avatar
Vũ Quốc Hoàng
Nejlepší odpověď

I think you need to inherit the menu which contains the link to the report. 

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <report 
            id="report_sale_order"
            string="Quotation / Order"
            model="sale.order" 
            report_type="qweb-pdf"
            file="sale.report_saleorder" 
            name="sale.report_saleorder" 
        />
    </data>
</openerp>

 

0
Avatar
Zrušit
Avatar
Peter Nietz
Nejlepší odpověď

Hi, try this:

<templates>
    <tr t-extend="purchase.report_purchaseorder">
        <t t-jquery=".page" t-operation="replace">
             <t t-foreach="docs" t-as="o"/>
            <div class ="page">

                <span id="change_test"/>
            </div>
        </t>
    </tr>
</templates>

if you can see the id change_test in fe. firebug the template is changed ... but I experience some strange behavior that also the template from which I inherit is changed -- so where is the use of inheritance here if everything is changed?

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
Related Posts Odpovědi Zobrazení Aktivita
Create QWeb reports from Odoo application
v8 qweb report
Avatar
0
pro 15
5103
Transfer the sum of all order lines of one page to the next page.
v8 qweb report
Avatar
0
bře 15
3942
Set report orientation Vyřešeno
v8 qweb report
Avatar
Avatar
1
bře 15
15052
Inherit Qweb Vyřešeno
v8 qweb inherit report
Avatar
Avatar
Avatar
Avatar
4
úno 24
49700
How do you use variables in a Qweb loop? Vyřešeno
v8 qweb report loop
Avatar
Avatar
Avatar
Avatar
Avatar
11
dub 23
94507
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