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 Invoice template through addon

Odebírat

Get notified when there's activity on this post

This question has been flagged
xmlinvoicelayouts
1 Odpovědět
1681 Zobrazení
Avatar
Milos Boksan

Hello all,

I am trying to edit a couple of thing on the invoice template:

1. The arrangement of customer information
2. Remove some columns from the table
3. Correctly display the sections in the invoice template

I need to emphasise that this MUST BE DONE through an inherited module located in "opt/odoo/data/addons/16.0/ADDON_NAME". There are reasons for this.

So far what I have created is a directory named "update_invoice_template" that contains the following:

__init__.py

*empty*

__manifest__.py

{
    "name" : "Styled Invoice Template",
    "version" : "2.0",
    "category" : "Customization",
    'depends': ['account'],
    'data': [
        'views/report_invoice_document_styled. xml',
        'views/report_invoice_with_payments_styled. xml',
    ],
    'installable': True,
}

views (directory)

- report_invoice_document_styled.xml
(I've removed the "less than" symbol from the beginning of each row otherwise the code refused to be displayed)

​?xml version="1.0" encoding="utf-8"?>
odoo>
template inherit_id="account.report_invoice_document" id="report_invoice_document_styled">
xpath expr="//div[@name='address_not_same_as_shipping']" position="replace">
div class="col-6" name="address_not_same_as_shipping">
t t-set="address">
address class="mb-0">
​ ​ ​ ​t t-set="company_name" t-value="o.partner_id.parent_id.name"/>
​ ​ ​ ​t t-set="legal_form_name" t-value="o.partner_id.parent_id.company_legal_form_id.name"/>
​ ​ ​ ​ ​t t-set="street" t-value="o.partner_id.street"/>
​ ​ ​ ​t t-set="zip_code" t-value="o.partner_id.zip"/>
​ ​ ​ ​t t-set="city" t-value="o.partner_id.city"/>
​ ​ ​ ​t t-set="temp_country_code" t-value="o.partner_id.country_id.id"/>
​ ​ ​ ​t t-set="temp_language" t-value="o.partner_id.lang"/>
​ ​ ​ ​t t-set="country_name" t-value="env['res.country'].browse(temp_country_code).with_context(lang=temp_language).name"/>
​ ​ ​ ​span>
​ ​ ​ ​br/>
​ ​ ​ ​span>
​ ​ ​ ​br/>
​ ​ ​ ​span>
​ ​ ​ ​br/>
​ ​ ​ ​span>
/address>
div t-if="o.partner_id.parent_id.vat" id="partner_vat_address_same_as_shipping"
​t t-if="o.company_id.account_fiscal_country_id.vat_label" t-esc="o.company_id.account_fiscal_country_id.vat_label" id="inv_tax_id_label"/>
​​t t-else="">Tax ID:
/div>
/t>
/div>
/xpath>
xpath expr="//div[@class='mt-5']" position="attributes">
​ attribute name="style">font-size: 12px
/xpath>
xpath expr="//th[@name='th_taxes']" position="replace"/>
xpath expr="//td[span/@id='line_tax_ids']" position="replace"/>
/template>
/odoo>

- report_invoice_with_payments_styled.xml
(I've removed the "less than" symbol from the beginning of each row otherwise the code refused to be displayed)

?xml version="1.0" encoding="utf-8"?>
odoo>
template inherit_id="account.report_invoice_with_payments" id="report_invoice_with_payments_styled">
t t-call="web.html_container">
t t-foreach="docs" t-as="o">
t t-set="lang" t-value="o.partner_id.lang"/>
t t-set="print_with_payments" t-value="True"/>
t t-if="o._get_name_invoice_report() == 'account.report_invoice_document_styled'" t-call="account.report_invoice_document_styled" t-lang="lang"/>
/t>
/t>
/template>
/odoo>

The app appears in Odoo, successfully installs, all external identifiers are craeted successfully, but the changes arent applied. Can anyone assist?

Thanks in advance

0
Avatar
Zrušit
Avatar
Milos Boksan
Autor Nejlepší odpověď

Any 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
Related Posts Odpovědi Zobrazení Aktivita
Enable Counters in odoo what is the use of it Vyřešeno
xml
Avatar
Avatar
1
bře 25
2613
uploading xml for invoicing tax not taken
xml
Avatar
0
lis 24
2428
Thousand seperator
xml
Avatar
0
čvn 24
2213
readonly to specific group and when the stage is in 2, 3, 4
xml
Avatar
Avatar
1
čvn 24
2802
Why is appearing this sentece Payment comunication when I print customer invoice?
invoicelayouts
Avatar
Avatar
2
úno 24
1488
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