Browse Source

Apr 03: [FIX] Bug Fixed 'invoice_format_editor'

pull/254/merge
RisvanaCybro 1 year ago
parent
commit
46eb66a708
  1. 2
      invoice_format_editor/__manifest__.py
  2. 5
      invoice_format_editor/doc/RELEASE_NOTES.md
  3. 122
      invoice_format_editor/reports/custom_invoice_template.xml
  4. 125
      invoice_format_editor/reports/custom_invoice_template_fantacy.xml
  5. 488
      invoice_format_editor/reports/custom_invoice_template_old_standard.xml

2
invoice_format_editor/__manifest__.py

@ -22,7 +22,7 @@
{ {
'name': 'Invoice Format Editor', 'name': 'Invoice Format Editor',
'version': '15.0.1.0.1', 'version': '15.0.1.1.1',
'category': 'Accounting', 'category': 'Accounting',
'summary': 'Invoice Format Editor', 'summary': 'Invoice Format Editor',
'description': """Invoice Format Editor For Configuring the Invoice Templates""", 'description': """Invoice Format Editor For Configuring the Invoice Templates""",

5
invoice_format_editor/doc/RELEASE_NOTES.md

@ -10,3 +10,8 @@
#### UPDT AND BUGFIX #### UPDT AND BUGFIX
- Invoice printing issue - Invoice printing issue
#### 03.04.2024
#### Version 15.0.1.1.1
##### UPDATE
- Bug Fix-Resolved the attribute error, updated the report templates

122
invoice_format_editor/reports/custom_invoice_template.xml

@ -102,28 +102,8 @@
<tr> <tr>
<td> <td>
<span style="color:#{o.theme_id.customer_text_color} !important;" <span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id"/> t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
<br/> <br/>
<span t-if="o.theme_id.address">
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.street"/>
<br/>
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.street2"/>
<br/>
</span>
<span t-if="o.theme_id.city">
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.city"/>
<br/>
</span>
<span t-if="o.theme_id.country">
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.country_id"/>
<br/>
</span>
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;" <span t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.vat"/> t-field="o.partner_id.vat"/>
<br/> <br/>
@ -179,7 +159,7 @@
</tr> </tr>
</table> </table>
<div class="page"> <div class="page">
<div t-attf-style="padding:2%"> <div>
<h2> <h2>
<center> <center>
<span t-if="o.move_type == 'out_invoice' and (o.state == 'draft' or o.state == 'posted')"> <span t-if="o.move_type == 'out_invoice' and (o.state == 'draft' or o.state == 'posted')">
@ -318,11 +298,13 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div> <div class="clearfix mb-4">
<div class="col-4 pull-right"> <div class="col-4 pull-right">
<table class="table table-condensed"> <table class="table table-condensed">
<t t-set="tax_totals" t-value="json.loads(o.tax_totals_json)"/> <t t-set="tax_totals"
<t t-foreach="tax_totals['subtotals']" t-as="subtotal"> t-value="json.loads(o.tax_totals_json)"/>
<t t-foreach="tax_totals['subtotals']"
t-as="subtotal">
<tr class="border-black o_subtotal"> <tr class="border-black o_subtotal">
<td> <td>
<strong t-esc="subtotal['name']"/> <strong t-esc="subtotal['name']"/>
@ -337,7 +319,8 @@
</td> </td>
</tr> </tr>
<t t-set="subtotal_to_show" t-value="subtotal['name']"/> <t t-set="subtotal_to_show"
t-value="subtotal['name']"/>
<t t-call="account.tax_groups_totals"/> <t t-call="account.tax_groups_totals"/>
</t> </t>
@ -353,60 +336,52 @@
</tr> </tr>
</table> </table>
</div> </div>
</div> <div style="padding-top:15%;" class="col-12">
<div style="padding-top:10%;" class="col-12"> <p t-if="o.move_type in ('out_invoice', 'in_refund') and o.payment_reference"
<p t-if="not is_html_empty(o.narration)"> name="payment_communication">
<strong>Comment:</strong> Please use the following communication for your
<span t-field="o.narration"/> payment :
</p> <b>
<p t-if="o.fiscal_position_id.note"> <span t-field="o.payment_reference"/>
<strong>Fiscal Position Remark:</strong> </b>
<span t-field="o.fiscal_position_id.note"/>
</p>
<br/>
<br/>
<p t-if="o.move_type in ('out_invoice','in_refund')">
Please use the following communication for your
payment :
<b>
<span t-field="o.payment_reference"/>
</b>
</p>
<p t-if="o.invoice_payment_term_id" name="payment_term">
<span t-field="o.invoice_payment_term_id.note"/>
</p>
<p t-if="o.fiscal_position_id.note" name="note">
<span t-field="o.fiscal_position_id.note"/>
</p>
<t t-if="o.company_id.country_id.code == 'IN'">
<p id="total_in_words" class="mb16">
<strong>Total (In Words):</strong>
<span t-field="o.amount_total_words"/>
</p> </p>
</t> <p t-if="o.invoice_payment_term_id"
<div id="qrcode" name="payment_term">
t-if="(o.company_id.qr_code) and (o.currency_id.name == 'EUR') and (o.invoice_partner_bank_id.acc_number != False)"> <span t-field="o.invoice_payment_term_id.note"/>
<p t-if="(o.invoice_partner_bank_id.qr_code_valid)"> </p>
<strong class="text-center">Scan me with your <div t-if="not is_html_empty(o.narration)"
banking app. name="comment">
</strong> <span t-field="o.narration"/>
<br/> </div>
<br/> <p t-if="not is_html_empty(o.fiscal_position_id.note)"
<img class="border border-dark rounded" name="note">
t-att-src="o.invoice_partner_bank_id.build_qr_code_url(o.amount_residual, o.ref or o.name)"/> <span t-field="o.fiscal_position_id.note"/>
</p> </p>
<p t-if="(o.invoice_partner_bank_id.qr_code_valid == False)"> <p t-if="o.invoice_incoterm_id" name="incoterm">
<strong class="text-center">The SEPA QR Code <strong>Incoterm:</strong>
informations are not set correctly. <span t-field="o.invoice_incoterm_id.code"/>
</strong> -
<br/> <span t-field="o.invoice_incoterm_id.name"/>
</p> </p>
<div id="qrcode"
t-if="o.display_qr_code and o.amount_residual > 0">
<p t-if="qr_code_urls.get(o.id)">
<strong class="text-center">Scan me with
your banking app.
</strong>
<br/>
<br/>
<img class="border border-dark rounded"
t-att-src="qr_code_urls[o.id]"/>
</p>
</div>
</div> </div>
</div> </div>
</div> </div>
</t> </t>
</template> </template>
<template id="report_invoice_with_payments_inherit" inherit_id="account.report_invoice_with_payments"> <template id="report_invoice_with_payments_inherit"
inherit_id="account.report_invoice_with_payments">
<xpath expr="//t[@t-call='web.html_container']" position="replace"> <xpath expr="//t[@t-call='web.html_container']" position="replace">
<t t-call="web.html_container"> <t t-call="web.html_container">
<t t-foreach="docs" t-as="o"> <t t-foreach="docs" t-as="o">
@ -433,7 +408,8 @@
</t> </t>
</xpath> </xpath>
</template> </template>
<template id="report_invoice_inherit" inherit_id="account.report_invoice"> <template id="report_invoice_inherit"
inherit_id="account.report_invoice">
<xpath expr="//t[@t-call='web.html_container']" position="replace"> <xpath expr="//t[@t-call='web.html_container']" position="replace">
<t t-call="web.html_container"> <t t-call="web.html_container">
<t t-foreach="docs" t-as="o"> <t t-foreach="docs" t-as="o">

125
invoice_format_editor/reports/custom_invoice_template_fantacy.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<data> <data>
<!--modern Template View--> <!--modern Template View-->
<template id="custom_template_report_invoice_modern"> <template id="custom_template_report_invoice_modern">
<t t-if="o and 'company_id' in o"> <t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"/> <t t-set="company" t-value="o.company_id"/>
@ -130,26 +130,8 @@
<strong>Customer Address</strong> <strong>Customer Address</strong>
<br/> <br/>
<span style="color:#{o.theme_id.customer_text_color} !important;" <span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id"/> t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
<br/> <br/>
<span t-if="o.theme_id.address">
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.street"/>
<br/>
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.street2"/>
<br/>
</span>
<span t-if="o.theme_id.city">
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.city"/>
</span>
<br/>
<span t-if="o.theme_id.country">
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.country_id"/>
</span>
<br/>
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;" <span t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.vat"/> t-field="o.partner_id.vat"/>
<br/> <br/>
@ -251,11 +233,13 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div> <div class="clearfix mb-4">
<div class="col-4 pull-right"> <div class="col-4 pull-right">
<table class="table table-condensed"> <table class="table table-condensed">
<t t-set="tax_totals" t-value="json.loads(o.tax_totals_json)"/> <t t-set="tax_totals"
<t t-foreach="tax_totals['subtotals']" t-as="subtotal"> t-value="json.loads(o.tax_totals_json)"/>
<t t-foreach="tax_totals['subtotals']"
t-as="subtotal">
<tr class="border-black o_subtotal"> <tr class="border-black o_subtotal">
<td> <td>
<strong t-esc="subtotal['name']"/> <strong t-esc="subtotal['name']"/>
@ -263,14 +247,15 @@
<td class="text-right"> <td class="text-right">
<span <span
t-att-class="oe_subtotal_footer_separator" t-att-class="oe_subtotal_footer_separator"
t-esc="subtotal['amount']" t-esc="subtotal['amount']"
t-options='{"widget": "monetary", "display_currency": o.currency_id}' t-options='{"widget": "monetary", "display_currency": o.currency_id}'
/> />
</td> </td>
</tr> </tr>
<t t-set="subtotal_to_show" t-value="subtotal['name']"/> <t t-set="subtotal_to_show"
t-value="subtotal['name']"/>
<t t-call="account.tax_groups_totals"/> <t t-call="account.tax_groups_totals"/>
</t> </t>
@ -280,61 +265,51 @@
<strong>Total</strong> <strong>Total</strong>
</td> </td>
<td class="text-right"> <td class="text-right">
<span t-esc="tax_totals['amount_total']" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> <span t-esc="tax_totals['amount_total']"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</div> <div style="padding-top:15%;" class="col-12">
<div style="padding-top:10%;" class="col-12"> <p t-if="o.move_type in ('out_invoice', 'in_refund') and o.payment_reference"
<p t-if="not is_html_empty(o.narration)"> name="payment_communication">
<strong>Comment:</strong> Please use the following communication for your
<span t-field="o.narration"/> payment :
</p> <b>
<p t-if="o.fiscal_position_id.note"> <span t-field="o.payment_reference"/>
<strong>Fiscal Position Remark:</strong> </b>
<span t-field="o.fiscal_position_id.note"/> </p>
</p> <p t-if="o.invoice_payment_term_id"
<br/> name="payment_term">
<br/> <span t-field="o.invoice_payment_term_id.note"/>
<p t-if="o.move_type in ('out_invoice','in_refund')">
Please use the following communication for your
payment
:
<b>
<span t-field="o.payment_reference"/>
</b>
</p>
<p t-if="o.invoice_payment_term_id" name="payment_term">
<span t-field="o.invoice_payment_term_id.note"/>
</p>
<p t-if="o.fiscal_position_id.note" name="note">
<span t-field="o.fiscal_position_id.note"/>
</p>
<t t-if="o.company_id.country_id.code == 'IN'">
<p id="total_in_words" class="mb16">
<strong>Total (In Words):</strong>
<span t-field="o.amount_total_words"/>
</p> </p>
</t> <div t-if="not is_html_empty(o.narration)"
<div id="qrcode" name="comment">
t-if="(o.company_id.qr_code) and (o.currency_id.name == 'EUR') and (o.invoice_partner_bank_id.acc_number != False)"> <span t-field="o.narration"/>
<p t-if="(o.invoice_partner_bank_id.qr_code_valid)"> </div>
<strong class="text-center">Scan me with your <p t-if="not is_html_empty(o.fiscal_position_id.note)"
banking app. name="note">
</strong> <span t-field="o.fiscal_position_id.note"/>
<br/>
<br/>
<img class="border border-dark rounded"
t-att-src="o.invoice_partner_bank_id.build_qr_code_url(o.amount_residual, o.ref or o.name)"/>
</p> </p>
<p t-if="(o.invoice_partner_bank_id.qr_code_valid == False)"> <p t-if="o.invoice_incoterm_id" name="incoterm">
<strong class="text-center">The SEPA QR Code <strong>Incoterm:</strong>
informations are not set <span t-field="o.invoice_incoterm_id.code"/>
correctly. -
</strong> <span t-field="o.invoice_incoterm_id.name"/>
<br/>
</p> </p>
<div id="qrcode"
t-if="o.display_qr_code and o.amount_residual > 0">
<p t-if="qr_code_urls.get(o.id)">
<strong class="text-center">Scan me with
your banking app.
</strong>
<br/>
<br/>
<img class="border border-dark rounded"
t-att-src="qr_code_urls[o.id]"/>
</p>
</div>
</div> </div>
</div> </div>
</div> </div>

488
invoice_format_editor/reports/custom_invoice_template_old_standard.xml

@ -1,6 +1,6 @@
<odoo> <odoo>
<data> <data>
<!--old Template View--> <!--old Template View-->
<template id="old_std_report_invoice_document"> <template id="old_std_report_invoice_document">
<t t-if="o and 'company_id' in o"> <t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"/> <t t-set="company" t-value="o.company_id"/>
@ -15,254 +15,310 @@
t-att-src="'data:image/png;base64,%s' % to_text(company.logo)" t-att-src="'data:image/png;base64,%s' % to_text(company.logo)"
style="max-height: 80px;"/> style="max-height: 80px;"/>
</div> </div>
<div t-attf-class="pull-#{o.theme_id.company_position} "
t-attf-style="font:14px lucida-console,sans-serif; color:#{o.theme_id.company_text_color} !important;">
<span t-field="company.partner_id"/>
<br/>
<span t-field="company.partner_id.street"/>
<br/>
<span t-field="company.partner_id.street2"/>
<br/>
<span t-field="company.partner_id.city"/>
<br/>
<span t-field="company.partner_id.country_id"/>
<br/>
<span t-field="company.partner_id.vat"/>
<br/>
</div>
</div> </div>
</div> </div>
<t t-call="web.external_layout"> <t t-call="web.external_layout">
<t t-set="o" <t t-set="o"
t-value="o.with_context({'lang':o.partner_id.lang})"/> t-value="o.with_context({'lang':o.partner_id.lang})"/>
<div class="page"> <div class="page">
<div class=" row mt32 mb32"> <div id="customer_address"
<div class="col-12" style="padding-top:20px;"> t-attf-style="color:#{o.theme_id.customer_text_color}">
<div t-attf-class=" pull-#{o.theme_id.customer_position} text-#{o.theme_id.customer_position}" <div class="row">
style="font:15px lucida-console,sans-serif !important;"> <div t-attf-class="col-12 text-#{o.theme_id.customer_position} ">
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;" <div itemprop="address" class="address">
t-field="o.partner_id"/> <div>
<br/> <span t-if="o.partner_id">
<span t-if="o.theme_id.address"> <span style="color:#{o.theme_id.customer_text_color} !important;"
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;" t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
t-field="o.partner_id.street"/> </span>
<br/> </div>
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;" <div>
t-field="o.partner_id.street2"/> <span t-if="o.partner_id.vat">
</span> <span style="color:#{o.theme_id.customer_text_color} !important;"
<br/> t-field="o.partner_id.vat"/>
<span t-if="o.theme_id.city"> </span>
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;" </div>
t-field="o.partner_id.city"/> </div>
</span>
<br/>
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.state_id"/>
<br/>
<span t-if="o.theme_id.country">
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.country_id"/>
</span>
<br/>
<span t-attf-style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.vat"/>
<br/>
</div> </div>
<div t-attf-class="pull-right" </div>
t-attf-style="font:15px lucida-console,sans-serif !important;background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color};padding:2%"> </div>
<h2> <br/>
<span t-if="o.move_type == 'out_invoice' and (o.state == 'draft' or o.state == 'posted')"> <div class="page">
<font t-attf-style="color:#{o.theme_id.heading_text_color}"> <div
Invoice t-attf-style="font:15px lucida-console,sans-serif !important;background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color};padding:2%">
</font> <h2>
</span> <span t-if="o.move_type == 'out_invoice' and (o.state == 'draft' or o.state == 'posted')">
<span t-if="o.move_type == 'out_invoice' and o.state == 'proforma2'">
<font t-attf-style="color:#{o.theme_id.heading_text_color}">
PRO-FORMA
</font>
</span>
<span t-if="o.move_type == 'out_invoice' and o.state == 'draft'">
<font t-attf-style="color:#{o.theme_id.heading_text_color}">
Draft Invoice
</font>
</span>
<span t-if="o.move_type == 'out_invoice' and o.state == 'cancel'">
<font t-attf-style="color:#{o.theme_id.heading_text_color}">
Cancelled
Invoice
</font>
</span>
<span t-if="o.move_type == 'out_refund'">
<font t-attf-style="color:#{o.theme_id.heading_text_color}">
Refund
</font>
</span>
<span t-if="o.move_type == 'in_refund'">
<font t-attf-style="color:#{o.theme_id.heading_text_color}">
Vendor Refund
</font>
</span>
<span t-if="o.move_type == 'in_invoice'">
<font t-attf-style="color:#{o.theme_id.text_color}">
Vendor Bill
</font>
</span>
<font t-attf-style="color:#{o.theme_id.heading_text_color}"> <font t-attf-style="color:#{o.theme_id.heading_text_color}">
<span t-field="o.name"/> Invoice
</font> </font>
</h2> </span>
<div t-if="o.invoice_date"> <span t-if="o.move_type == 'out_invoice' and o.state == 'proforma2'">
<font t-attf-style="color:#{o.theme_id.heading_text_color}"> <font t-attf-style="color:#{o.theme_id.heading_text_color}">
<strong>Invoice Date:</strong> PRO-FORMA
<p t-field="o.invoice_date"/>
</font> </font>
</div> </span>
<div t-if="o.name"> <span t-if="o.move_type == 'out_invoice' and o.state == 'draft'">
<font t-attf-style="color:#{o.theme_id.heading_text_color}"> <font t-attf-style="color:#{o.theme_id.heading_text_color}">
<strong>Due Date:</strong> Draft Invoice
<p t-field="o.invoice_date_due"/>
</font> </font>
</div> </span>
<span t-if="o.move_type == 'out_invoice' and o.state == 'cancel'">
<div t-if="o.theme_id.reference">
<div t-if="o.ref">
<font t-attf-style="color:#{o.theme_id.heading_text_color}"> <font t-attf-style="color:#{o.theme_id.heading_text_color}">
<strong>Reference:</strong> Cancelled
<p t-field="o.ref"/> Invoice
</font> </font>
</div> </span>
</div> <span t-if="o.move_type == 'out_refund'">
<div t-if="o.theme_id.source">
<div t-if="o.invoice_origin">
<font t-attf-style="color:#{o.theme_id.heading_text_color}"> <font t-attf-style="color:#{o.theme_id.heading_text_color}">
<strong>Source:</strong> Refund
<p t-field="o.invoice_origin"/>
</font> </font>
</div> </span>
<span t-if="o.move_type == 'in_refund'">
<font t-attf-style="color:#{o.theme_id.heading_text_color}">
Vendor Refund
</font>
</span>
<span t-if="o.move_type == 'in_invoice'">
<font t-attf-style="color:#{o.theme_id.text_color}">
Vendor Bill
</font>
</span>
<font t-attf-style="color:#{o.theme_id.heading_text_color}">
<span t-field="o.name"/>
</font>
</h2>
<br/>
<div id="invoice_information">
<div class="row mt32 mb32" id="informations">
<div class="col-auto col-3 mw-100 mb-2"
t-if="o.invoice_date"
name="invoice_date">
<strong t-attf-style="color:#{o.theme_id.heading_text_color}">
Invoice Date:
</strong>
<p class="m-0"
t-attf-style="color:#{o.theme_id.text_color}"
t-field="o.invoice_date"/>
</div>
<div class="col-auto col-3 mw-100 mb-2"
t-if="o.invoice_date_due and o.move_type == 'out_invoice' and o.state == 'posted'"
name="due_date">
<strong t-attf-style="color:#{o.theme_id.heading_text_color}">
Due Date:
</strong>
<p class="m-0"
t-attf-style="color:#{o.theme_id.text_color}"
t-field="o.invoice_date_due"/>
</div>
<div class="col-auto col-3 mw-100 mb-2"
t-if="o.invoice_payment_term_id"
name="payment_term">
<strong t-attf-style="color:#{o.theme_id.heading_text_color}">
Payment Term:
</strong>
<p class="m-0"
t-attf-style="color:#{o.theme_id.text_color}"
t-field="o.invoice_payment_term_id"/>
</div>
<!--optional information-->
<div class="col-auto col-3 mw-100 mb-2"
t-if="o.user_id">
<div t-if="o.theme_id.sales_person">
<font t-attf-style="color:#{o.theme_id.text_color}">
<strong t-attf-style="color:#{o.theme_id.heading_text_color}">
Sales Person:
</strong>
<p t-field="o.user_id"/>
</font>
</div>
</div>
<div class="col-auto col-3 mw-100 mb-2"
t-if="o.ref">
<div t-if="o.theme_id.reference">
<font t-attf-style="color:#{o.theme_id.text_color}">
<strong t-attf-style="color:#{o.theme_id.heading_text_color}">
Customer Reference:
</strong>
<p t-field="o.ref"/>
</font>
</div>
</div>
<div class="col-auto col-3 mw-100 mb-2"
t-if="o.invoice_origin">
<div t-if="o.theme_id.source">
<font t-attf-style="color:#{o.theme_id.text_color}">
<strong t-attf-style="color:#{o.theme_id.heading_text_color}">
Source:
</strong>
<p t-field="o.invoice_origin"/>
</font>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> <div style="padding-top:20px;"/>
<div style="padding-top:20px;"/> <t t-set="display_discount"
<t t-set="display_discount" t-value="any([l.discount for l in o.invoice_line_ids])"/>
t-value="any([l.discount for l in o.invoice_line_ids])"/> <table class="table table-sm">
<table class="table table-sm"> <thead>
<thead> <tr>
<tr>
<th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}">
Product
</th>
<span t-if="o.theme_id.description">
<th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}"> <th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}">
Description Product
</th> </th>
</span> <span t-if="o.theme_id.description">
<th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}"> <th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}">
Quantity Description
</th> </th>
<th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}"> </span>
Unit Price
</th>
<th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}"
t-if="display_discount" class="text-right"
groups="sale.group_discount_per_so_line">
Disc.(%)
</th>
<span t-if="o.theme_id.tax_value">
<th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}"> <th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}">
Taxes Quantity
</th> </th>
</span> <th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}">
<th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}"> Unit Price
Price </th>
</th> <th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}"
</tr> t-if="display_discount"
</thead> class="text-right"
<tbody class="invoice_tbody"> groups="sale.group_discount_per_so_line">
<tr t-foreach="o.invoice_line_ids" t-as="l"> Disc.(%)
<td t-if="l.product_id.name"> </th>
<span t-field="l.product_id.name"/> <span t-if="o.theme_id.tax_value">
</td> <th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}">
<span t-if="o.theme_id.description"> Taxes
<td t-if="l.name"> </th>
<span t-field="l.name"/> </span>
</td> <th t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}">
</span> Price
<td class="text-right" t-if="l.quantity"> </th>
<span t-field="l.quantity"/> </tr>
<span t-field="l.uom_id" </thead>
groups="product.group_uom"/> <tbody class="invoice_tbody">
</td> <tr t-foreach="o.invoice_line_ids" t-as="l">
<td class="text-right" t-if="l.price_unit"> <td t-if="l.product_id.name">
<span t-field="l.price_unit"/> <span t-field="l.product_id.name"/>
</td>
<td t-if="l.discount" class="text-right"
groups="sale.group_discount_per_so_line">
<span t-field="l.discount"/>
</td>
<span t-if="o.theme_id.tax_value">
<td>
<span t-esc="', '.join(map(lambda x: (x.description or x.name), l.tax_ids))"/>
</td> </td>
</span> <span t-if="o.theme_id.description">
<td class="text-right" t-if="l.price_subtotal"> <td t-if="l.name">
<span t-field="l.price_subtotal" <span t-field="l.name"/>
t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
</td>
</tr>
</tbody>
</table>
<div>
<div class="col-4 pull-right">
<table class="table table-condensed">
<t t-set="tax_totals" t-value="json.loads(o.tax_totals_json)"/>
<t t-foreach="tax_totals['subtotals']" t-as="subtotal">
<tr class="border-black o_subtotal">
<td>
<strong t-esc="subtotal['name']"/>
</td> </td>
</span>
<td class="text-right"> <td class="text-right" t-if="l.quantity">
<span <span t-field="l.quantity"/>
t-att-class="oe_subtotal_footer_separator" <span t-field="l.uom_id"
t-esc="subtotal['amount']" groups="product.group_uom"/>
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
/>
</td>
</tr>
<t t-set="subtotal_to_show" t-value="subtotal['name']"/>
<t t-call="account.tax_groups_totals"/>
</t>
<!--Total amount with all taxes-->
<tr class="border-black o_total"
t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}">
<td>
<strong>Total</strong>
</td> </td>
<td class="text-right"> <td class="text-right" t-if="l.price_unit">
<span t-esc="tax_totals['amount_total']" <span t-field="l.price_unit"/>
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td> </td>
</tr> <td t-if="l.discount" class="text-right"
<tr class="border-black"> groups="sale.group_discount_per_so_line">
<td> <span t-field="l.discount"/>
<strong>Amount Due</strong>
</td> </td>
<td class="text-right"> <span t-if="o.theme_id.tax_value">
<span t-field="o.amount_residual" <td>
<span t-esc="', '.join(map(lambda x: (x.description or x.name), l.tax_ids))"/>
</td>
</span>
<td class="text-right"
t-if="l.price_subtotal">
<span t-field="l.price_subtotal"
t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/> t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
</td> </td>
</tr> </tr>
</table> </tbody>
</table>
<div class="clearfix mb-4">
<div class="col-4 pull-right">
<table class="table table-condensed">
<t t-set="tax_totals"
t-value="json.loads(o.tax_totals_json)"/>
<t t-foreach="tax_totals['subtotals']"
t-as="subtotal">
<tr class="border-black o_subtotal">
<td>
<strong t-esc="subtotal['name']"/>
</td>
<td class="text-right">
<span
t-att-class="oe_subtotal_footer_separator"
t-esc="subtotal['amount']"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
/>
</td>
</tr>
<t t-set="subtotal_to_show"
t-value="subtotal['name']"/>
<t t-call="account.tax_groups_totals"/>
</t>
<!--Total amount with all taxes-->
<tr class="border-black o_total"
t-attf-style="background-color:#{o.theme_id.base_color};color:#{o.theme_id.heading_text_color}">
<td>
<strong>Total</strong>
</td>
<td class="text-right">
<span t-esc="tax_totals['amount_total']"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr class="border-black">
<td>
<strong>Amount Due</strong>
</td>
<td class="text-right">
<span t-field="o.amount_residual"
t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
</td>
</tr>
</table>
</div>
<div style="padding-top:15%;" class="col-12">
<p t-if="o.move_type in ('out_invoice', 'in_refund') and o.payment_reference"
name="payment_communication">
Please use the following communication for
your
payment :
<b>
<span t-field="o.payment_reference"/>
</b>
</p>
<p t-if="o.invoice_payment_term_id"
name="payment_term">
<span t-field="o.invoice_payment_term_id.note"/>
</p>
<div t-if="not is_html_empty(o.narration)"
name="comment">
<span t-field="o.narration"/>
</div>
<p t-if="not is_html_empty(o.fiscal_position_id.note)"
name="note">
<span t-field="o.fiscal_position_id.note"/>
</p>
<p t-if="o.invoice_incoterm_id" name="incoterm">
<strong>Incoterm:</strong>
<span t-field="o.invoice_incoterm_id.code"/>
-
<span t-field="o.invoice_incoterm_id.name"/>
</p>
<div id="qrcode"
t-if="o.display_qr_code and o.amount_residual > 0">
<p t-if="qr_code_urls.get(o.id)">
<strong class="text-center">Scan me with
your banking app.
</strong>
<br/>
<br/>
<img class="border border-dark rounded"
t-att-src="qr_code_urls[o.id]"/>
</p>
</div>
</div>
</div> </div>
</div> </div>
<br/>
<br/>
<br/>
<br/>
<br/>
</div> </div>
</t> </t>
</template> </template>

Loading…
Cancel
Save