Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

Removing default invoice template

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
invoicexmltemplatesprintbuttonodooV8
3 Odpowiedzi
9803 Widoki
Awatar
E.M.

Hi, I have created a module which installs a new custom invoice template.

So from PRINT menu the user can choose either the "Standard Invoice" or the new "Custom Invoice".

I would like to remove the "Standard Invoice", what should I do? 

Is it possible to do it via XML?

0
Awatar
Odrzuć
Akhil P Sivan

You want to override the default invoice template by your custom module?

Awatar
Emipro Technologies Pvt. Ltd.
Najlepsza odpowiedź

There are two different ways to remove the already available report.

1) Override new report on existing (default) report.

This is simple way to hide / delete existing (default) report. While creating new report we just need to give External ID same as like existing report. In your case while you create your report you have to define it as like below.

 <report 
id="account.account_invoices"
model="account.invoice"
string="New Invoice Report"
report_type="qweb-pdf"
name="account.new_report_invoice"
file="new_report_invoice"
/>

2) Create new report and delete existing (default) report

This is complex method as compare to first. In this method we have to use <delete> tag to delete existing (default) report. While use of the <delete> tag we have to take care about noupdate parameter of <data> tag. In your case we have to define <delete> tag as like below.

<data noupdate="1">
<delete model="ir.actions.report.xml" id="account.account_invoices" />
</data>

It will helpful to you.

Thanks.


2
Awatar
Odrzuć
Awatar
Akhil P Sivan
Najlepsza odpowiedź

If you want to override the default invoice template by your custom module, with different header and footer, refer the following code:

<openerp>
<data>
<template id="report_invoice_document_inherited" inherit_id="account.report_invoice_document">
<xpath expr="//t[@t-call='report.external_layout']" position="replace">
<t t-call="report.new_layout">
<div class="page">
<t t-set="company" t-value="res_company">
</t>
<br />

<div class="row mt16 mb16">
<div class="col-xs-5">

<br />
<div style="background:#01008A; font-size:13.5pt;font-family:&quot;Helvetica&quot;,sans-serif;color:white" valign="top">
<strong><center>Bill To</center></strong>
</div>
<address style="padding:5px 5px 5px 5px;border-width: 1px; border-style: solid; border-color: #002b49;" t-field="o.address_shipping_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: true}"/>
</div>
<div class="col-xs-5 col-xs-push-2" >
<br />
<div style="background:#01008A; font-size:13.5pt;font-family:&quot;Helvetica&quot;,sans-serif;color:white" valign="top">
<strong><center>Ship To</center></strong>
</div>
<address style="padding:5px 5px 5px 5px;border-width: 1px; border-style: solid; border-color: #002b49;" t-field="o.partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: true}"/>
</div>
</div>
<h2>
<span t-if="o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')">Invoice</span>
<span t-if="o.type == 'out_invoice' and o.state == 'proforma2'">PRO-FORMA</span>
<span t-if="o.type == 'out_invoice' and o.state == 'draft'">Draft Invoice</span>
<span t-if="o.type == 'out_invoice' and o.state == 'cancel'">Cancelled Invoice</span>
<span t-if="o.type == 'out_refund'">Refund</span>
<span t-if="o.type == 'in_refund'">Supplier Refund</span>
<span t-if="o.type == 'in_invoice'">Supplier Invoice</span>
<span t-field="o.number"/>
</h2>
<div class="row mt32 mb32">
<div class="col-xs-2" t-if="o.name">
<strong>Description:</strong>
<p t-field="o.name"/>
</div>
<div class="col-xs-2" t-if="o.date_invoice">
<strong>Invoice Date:</strong>
<p t-field="o.date_invoice"/>
</div>
<div class="col-xs-2" t-if="o.origin">
<strong>Source:</strong>
<p t-field="o.origin"/>
</div>
<div class="col-xs-2" t-if="o.partner_id.ref">
<strong>Customer Code:</strong>
<p t-field="o.partner_id.ref"/>
</div>
<div class="col-xs-2" t-if="o.reference">
<strong>Reference:</strong>
<p t-field="o.reference"/>
</div>
</div>
<div class="row mt16 mb16">
<div class="col-xs-12">

<table class="table table-condensed" style="border-left:1px solid #000000;border-top:1px solid #000000;border-right:1px solid #000000;">
<thead>
<tr style="background-color:#F4F4F4;">
<th style="border:1px solid #000000;">Quantity</th>
<th style="border:1px solid #000000;">Item Code</th>
<th style="border:1px solid #000000;">Description</th>
<th class="text-right" style="border:1px solid #000000;">Price Each</th>
<th class="text-right" style="border:1px solid #000000;">Amount</th>
</tr>
</thead>
<tbody class="invoice_tbody">
<t t-set="item_no" t-value="1" />
<tr style="border:1px solid #000000;" t-foreach="o.invoice_line" t-as="l">
<t t-if="item_no%2!=0">

<td style="border-left:1px solid #000000;">

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


</td>
<td style="border-left:1px solid #000000;">
<span t-field="l.product_id.name"/>
</td>
<td style="border-left:1px solid #000000;">
<span t-field="l.name"/>
</td>

<td style="border-left:1px solid #000000;" class="text-right">
<span t-field="l.price_unit"/>
</td>

<td style="border-left:1px solid #000000;" class="text-right">
<span t-field="l.price_subtotal" t-field-options='{"widget": "monetary", "display_currency":
"o.currency_id"}'/>
</td>
</t>
<t t-if="item_no%2==0">

<td style="border-left:1px solid #000000;background-color:#F4F4F4;">

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


</td>
<td style="border-left:1px solid #000000;background-color:#F4F4F4;">
<span t-field="l.product_id.name"/>
</td>
<td style="border-left:1px solid #000000;background-color:#F4F4F4;">
<span t-field="l.name"/>
</td>

<td style="border-left:1px solid #000000;background-color:#F4F4F4;" class="text-right">
<span t-field="l.price_unit"/>
</td>

<td style="border-left:1px solid #000000;background-color:#F4F4F4;" class="text-right">
<span t-field="l.price_subtotal" t-field-options='{"widget": "monetary", "display_currency":
"o.currency_id"}'/>
</td>
</t>
<t t-set="item_no" t-value="item_no+1" />

</tr>
<tr style="border-top:1px solid #000000;">
<td style="border-left:2px solid #ffffff;border-top:1px solid #000000;"></td>
<td style="border-top:1px solid #000000;"></td>
<td style="border-top:1px solid #000000;"></td>
<td style="border-left:1px solid #000000;border-bottom:1px solid #000000;border-top:1px solid #000000;"><strong>Total:</strong></td>
<td style="border-bottom:1px solid #000000;border-top:1px solid #000000;"><span t-field="o.amount_total" t-field-options='{"widget": "monetary", "display_currency":
"o.currency_id"}'/></td>
</tr>

</tbody>
</table>
</div>

</div>
<p t-if="o.comment">
<span t-field="o.comment"/>
</p>
<p t-if="o.fiscal_position.note">
<strong>Fiscal Position Remark:</strong>
<span t-field="o.fiscal_position.note"/>
</p>
</div>
</t>
</xpath>


</template>


<template id="report.new_layout">
<!-- Multicompany -->
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"></t>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"></t>
</t>

<t t-call="report.new_layout_header" />
<t t-raw="0" />
<t t-call="report.new_layout_footer" />
</template>

<template id="report.new_layout_header">
<div class="header">
<div class="row">
<div class="col-xs-3">
<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 45px;"/>
</div>
<div class="col-xs-9 text-right" style="margin-top:20px;" t-field="company.rml_header1"/>
</div>
<div class="row zero_min_height">
<div class="col-xs-12">
<div style="border-bottom: 1px solid black;"></div>
</div>
</div>
<div class="row mt8 mb8">
<div class="col-xs-5">
<div t-field="company.partner_id"
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
style="border:1px solid #000000;"/>
</div>
</div>

</div>
</template>

<template id="report.new_layout_footer">

<div class="footer">

<div t-if="company.sale_note" class="row mt16 mb16">
<div class="col-xs-6">
<div style="border:1px solid #000000;background-color:#01008A;color:#ffffff">
<strong>International Banking Detail</strong>
</div>
<div style="border:1px solid #000000;">
<div t-field="company.sale_note"/>
</div>
</div>

</div>

</div>
</template>

</data>
</openerp>


1
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Limited number of available templates with print button - V8 - JasperReport
templates jasper ireport printbutton odooV8
Awatar
1
lip 17
3357
How to edit the template by customizing a module which has already edited from front end website editor.
xml templates odoo odooV8 website_sale
Awatar
0
paź 15
119
Add Fields to Invoice
invoice templates
Awatar
Awatar
1
paź 25
4585
Change text of "View Invoice" button from Invoice email
invoice templates
Awatar
0
sty 25
1889
Where can I find the Invoice Template in v17?
invoice templates
Awatar
Awatar
Awatar
3
lut 24
6534
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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