Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    डेमो देखें
  • कीमत
  • सहायता

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

  • सीआरएम
  • e-Commerce
  • लेखांकन
  • इन्वेंटरी
  • PoS
  • प्रोजेक्ट
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

Removing default invoice template

Subscribe

Get notified when there's activity on this post

This question has been flagged
invoicexmltemplatesprintbuttonodooV8
3 Replies
9793 Views
Avatar
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
Avatar
Discard
Akhil P Sivan

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

Avatar
Emipro Technologies Pvt. Ltd.
Best Answer

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
Avatar
Discard
Avatar
Akhil P Sivan
Best Answer

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
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

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

Sign up
Related Posts Replies Views Activity
Limited number of available templates with print button - V8 - JasperReport
templates jasper ireport printbutton odooV8
Avatar
1
जुल॰ 17
3351
How to edit the template by customizing a module which has already edited from front end website editor.
xml templates odoo odooV8 website_sale
Avatar
0
अक्तू॰ 15
119
Add Fields to Invoice
invoice templates
Avatar
Avatar
1
अक्तू॰ 25
4571
Change text of "View Invoice" button from Invoice email
invoice templates
Avatar
0
जन॰ 25
1885
Where can I find the Invoice Template in v17?
invoice templates
Avatar
Avatar
Avatar
3
फ़र॰ 24
6515
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة 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, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

Odoo की सबसे बड़ी खासियत है कि यह इस्तेमाल करने में बहुत आसान है और यह पूरी तरह से इंटिग्रेट किया हुआ है.

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