Browse Source

Apr 03: [FIX] Bug Fixed 'invoice_format_editor'

pull/278/merge
RisvanaCybro 1 year ago
parent
commit
e69ebc00b7
  1. 2
      invoice_format_editor/__manifest__.py
  2. 5
      invoice_format_editor/doc/RELEASE_NOTES.md
  3. 212
      invoice_format_editor/reports/modern_invoice_templates.xml
  4. 124
      invoice_format_editor/reports/normal_invoice_templates.xml
  5. 201
      invoice_format_editor/reports/old_standard_invoice_templates.xml

2
invoice_format_editor/__manifest__.py

@ -21,7 +21,7 @@
#############################################################################
{
'name': 'Invoice Format Editor',
'version': '16.0.2.0.0',
'version': '16.0.2.1.0',
'category': 'Accounting',
'summary': 'Invoice Format Editor',
'description': """Invoice Format Editor For Configuring the Invoice

5
invoice_format_editor/doc/RELEASE_NOTES.md

@ -4,3 +4,8 @@
#### Version 16.0.1.0.0
#### ADD
- Initial commit for Invoice Format Editor
#### 03.04.2024
#### Version 16.0.2.1.0
##### UPDATE
- Bug Fix-Resolved the attribute error, updated the report templates

212
invoice_format_editor/reports/modern_invoice_templates.xml

@ -6,16 +6,22 @@
<!--External layout template-->
<t t-call="web.external_layout">
<!--Invoice Reference-->
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})"/>
<t t-set="o"
t-value="o.with_context({'lang':o.partner_id.lang})"/>
<t t-set="model" t-value="'account.move'"/>
<div class="page" style="overflow: hidden;">
<br/><br/><br/><br/>
<br/>
<br/>
<br/>
<br/>
<!--Invoice details-->
<div class="row">
<div t-attf-style=" background-color:#{o.theme_id.base_color};padding:2% ;color:#{o.theme_id.customer_text_color};">
<h2 t-attf-style="color:#{o.theme_id.heading_text_color};">
<span t-if="o.move_type == 'out_invoice' and (o.state == 'draft' or o.state == 'posted')">
<font t-attf-style="color:#{o.theme_id.heading_text_color};">Invoice</font>
<font t-attf-style="color:#{o.theme_id.heading_text_color};">
Invoice
</font>
</span>
<span t-if="o.move_type == 'out_invoice' and o.state == 'proforma2'">
<font t-attf-style="color:#{o.theme_id.heading_text_color}">
@ -49,9 +55,11 @@
</span>
<font>
<span t-field="o.name" t-attf-style="color:#{o.theme_id.heading_text_color};"/>
<span t-field="o.name"
t-attf-style="color:#{o.theme_id.heading_text_color};"/>
</font>
</h2><br/>
</h2>
<br/>
<!--Invoice information-->
<div id="invoice_information">
<div class="row mt32 mb32" id="informations">
@ -61,7 +69,8 @@
<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}"
<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"
@ -70,7 +79,8 @@
<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}"
<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"
@ -79,7 +89,8 @@
<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}"
<p class="m-0"
t-attf-style="color:#{o.theme_id.text_color}"
t-field="o.invoice_payment_term_id"/>
</div>
<!--optional information-->
@ -119,7 +130,8 @@
</div>
</div>
</div>
</div><br/>
</div>
<br/>
<!--Customer Address-->
<div t-if="o.theme_id.address"
id="customer address"
@ -132,31 +144,7 @@
<div>
<span t-if="o.partner_id">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id"/>
</span>
</div>
<div>
<span t-if="o.partner_id.street">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.street"/>
</span>
</div>
<div>
<span t-if="o.partner_id.street2">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.street2"/>
</span>
</div>
<div t-if="o.theme_id.city">
<span t-if="o.partner_id.city">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.city"/>
</span>
</div>
<div t-if="o.theme_id.country">
<span t-if="o.partner_id.country_id">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.country_id"/>
t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
</span>
</div>
<div t-if="o.theme_id.vat">
@ -252,31 +240,44 @@
<div class="clearfix mb-4">
<div id="total" class="row">
<div t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ms-auto">
<table class="table table-sm table-borderless" style="page-break-inside: avoid;">
<table class="table table-sm table-borderless"
style="page-break-inside: avoid;">
<tbody>
<tr class="border-black o_subtotal" style="">
<t t-set="tax_totals" t-value="o.tax_totals"/>
<t t-foreach="tax_totals['subtotals']" t-as="subtotal">
<tr class="border-black o_subtotal"
style="">
<t t-set="tax_totals"
t-value="o.tax_totals"/>
<t t-foreach="tax_totals['subtotals']"
t-as="subtotal">
<tr class="border-black o_subtotal"
t-attf-style="color:#{o.theme_id.text_color};">
<td t-attf-style="color:#{o.theme_id.text_color};">
<strong t-esc="subtotal['name']" t-attf-style="color:#{o.theme_id.text_color};"/>
<strong t-esc="subtotal['name']"
t-attf-style="color:#{o.theme_id.text_color};"/>
</td>
<td class="text-end" t-attf-style="color:#{o.theme_id.text_color};">
<td class="text-end"
t-attf-style="color:#{o.theme_id.text_color};">
<span t-att-class="oe_subtotal_footer_separator"
t-attf-style="color:#{o.theme_id.text_color};"
t-esc="subtotal['formatted_amount']"/>
</td>
</tr>
<t t-set="subtotal_to_show" t-value="subtotal['name']"/>
<t t-call="account.tax_groups_totals" t-attf-style="color:#{o.theme_id.text_color};"/>
<t t-set="subtotal_to_show"
t-value="subtotal['name']"/>
<t t-call="account.tax_groups_totals"
t-attf-style="color:#{o.theme_id.text_color};"/>
</t>
</tr>
<!--Total amount with all taxes-->
<tr class="border-black o_total">
<td><strong t-attf-style="color:#{o.theme_id.customer_text_color}">Total</strong></td>
<td>
<strong t-attf-style="color:#{o.theme_id.customer_text_color}">
Total
</strong>
</td>
<td class="text-end">
<span t-esc="tax_totals['formatted_amount_total']" t-attf-style="color:#{o.theme_id.customer_text_color}"/>
<span t-esc="tax_totals['formatted_amount_total']"
t-attf-style="color:#{o.theme_id.customer_text_color}"/>
</td>
</tr>
<!--Paid amount details-->
@ -284,16 +285,21 @@
<t t-if="o.payment_state != 'invoicing_legacy'">
<t t-set="payments_vals"
t-value="o.sudo().invoice_payments_widget and o.sudo().invoice_payments_widget['content'] or []"/>
<t t-foreach="payments_vals" t-as="payment_vals">
<t t-foreach="payments_vals"
t-as="payment_vals">
<tr>
<td>
<i class="oe_form_field text-end oe_payment_label" t-attf-style="color:#{o.theme_id.text_color}">Paid on
<i class="oe_form_field text-end oe_payment_label"
t-attf-style="color:#{o.theme_id.text_color}">
Paid on
<t
t-esc="payment_vals['date']"
t-options='{"widget": "date"}' t-attf-style="color:#{o.theme_id.text_color}"/>
t-options='{"widget": "date"}'
t-attf-style="color:#{o.theme_id.text_color}"/>
</i>
</td>
<td class="text-end" t-attf-style="color:#{o.theme_id.text_color}">
<td class="text-end"
t-attf-style="color:#{o.theme_id.text_color}">
<span t-esc="payment_vals['amount']"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
@ -302,10 +308,13 @@
<t t-if="len(payments_vals) > 0">
<tr class="border-black o_total">
<td>
<strong t-attf-style="color:#{o.theme_id.customer_text_color}">Amount Due</strong>
<strong t-attf-style="color:#{o.theme_id.customer_text_color}">
Amount Due
</strong>
</td>
<td class="text-end">
<span t-field="o.amount_residual" t-attf-style="color:#{o.theme_id.customer_text_color}"/>
<span t-field="o.amount_residual"
t-attf-style="color:#{o.theme_id.customer_text_color}"/>
</td>
</tr>
</t>
@ -315,50 +324,91 @@
</table>
</div>
</div>
<div t-attf-style="color:#{o.theme_id.text_color};padding-top:5%;"
class="col-12">
<p t-if="o.move_type in ('out_invoice', 'in_refund') and o.payment_reference"
name="payment_communication" class="mt-4">
Please use the following communication for
your
payment :
<b>
<span t-field="o.payment_reference"/>
</b>
</p>
<t t-set="payment_term_details"
t-value="o.payment_term_details"/>
<div t-field="o.invoice_payment_term_id.note"
name="payment_term"/>
<t t-if="o.invoice_payment_term_id.display_on_invoice and payment_term_details">
<div t-if='o.show_payment_term_details'
id="total_payment_term_details_table"
class="row">
<div t-attf-class="#{'col-7' if report_type != 'html' else 'col-sm-7 col-md-6'} mt-2 mb-2">
<table class="table table-sm"
style="page-break-inside: avoid;">
<th class="border-black text-start">
Due Date
</th>
<th class="border-black text-end">
Amount Due
</th>
<th t-if="o.show_discount_details"
class="border-black text-end">
Discount
</th>
<t t-foreach="payment_term_details"
t-as="term">
<tr>
<td t-esc="term.get('date')"
class="text-start"/>
<td t-options='{"widget": "monetary", "display_currency": o.currency_id}'
t-esc="term.get('amount')"
class="text-end"/>
<td t-if="term.get('discount_date')"
class="text-end">
<span t-options='{"widget": "monetary", "display_currency": o.currency_id}'
t-esc="term.get('discount_amount_currency')"/>
if paid before
<span t-esc="term.get('discount_date')"/>
</td>
</tr>
</t>
</table>
</div>
</div>
<br/><br/><br/><br/>
<div t-attf-style="color:#{o.theme_id.text_color};padding-top:10%;" class="col-12">
<p t-if="not is_html_empty(o.narration)">
<strong>Comment:</strong>
</t>
<div t-if="not is_html_empty(o.narration)"
name="comment">
<span t-field="o.narration"/>
</p>
<p t-if="o.fiscal_position_id.note">
<strong>Fiscal Position Remark:</strong>
<span t-field="o.fiscal_position_id.note"/>
</p>
<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">
</div>
<p t-if="not is_html_empty(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 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>
</t>
<div id="qrcode"
t-if="(o.company_id.qr_code) and (o.currency_id.name == 'EUR') and (o.invoice_partner_bank_id.acc_number != False)">
<p t-if="(o.invoice_partner_bank_id.qr_code_valid)">
<strong class="text-center">Scan me with your banking app.</strong>
<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 t-if="(o.invoice_partner_bank_id.qr_code_valid == False)">
<strong class="text-center">The SEPA QR Code information are not set correctly.
t-if="o.display_qr_code and o.amount_residual > 0">
<t t-set="qr_code_url"
t-value="o._generate_qr_code(silent_errors=True)"/>
<p t-if="qr_code_url">
<strong class="text-center">Scan me with
your banking app.
</strong>
<br/>
<br/>
<img class="border border-dark rounded"
t-att-src="qr_code_url"/>
</p>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
</data>

124
invoice_format_editor/reports/normal_invoice_templates.xml

@ -24,31 +24,7 @@
<div>
<span t-if="o.partner_id">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id"/>
</span>
</div>
<div>
<span t-if="o.partner_id.street">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.street"/>
</span>
</div>
<div>
<span t-if="o.partner_id.street2">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.street2"/>
</span>
</div>
<div t-if="o.theme_id.city">
<span t-if="o.partner_id.city">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.city"/>
</span>
</div>
<div t-if="o.theme_id.country">
<span t-if="o.partner_id.country_id">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.country_id"/>
t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
</span>
</div>
<div t-if="o.theme_id.vat">
@ -322,53 +298,91 @@
</table>
</div>
</div>
</div>
<!--More description-->
<div t-attf-style="color:#{o.theme_id.text_color};padding-top:10%;" class="col-12">
<p t-if="not is_html_empty(o.narration)">
<strong>Comment:</strong>
<span t-field="o.narration"/>
</p>
<p t-if="o.fiscal_position_id.note">
<strong>Fiscal Position Remark:</strong>
<span t-field="o.fiscal_position_id.note"/>
</p>
<p t-if="o.move_type in ('out_invoice','in_refund')">
Please use the following communication for your
<p t-if="o.move_type in ('out_invoice', 'in_refund') and o.payment_reference"
name="payment_communication" class="mt-4">
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">
<t t-set="payment_term_details"
t-value="o.payment_term_details"/>
<div t-field="o.invoice_payment_term_id.note"
name="payment_term"/>
<t t-if="o.invoice_payment_term_id.display_on_invoice and payment_term_details">
<div t-if='o.show_payment_term_details'
id="total_payment_term_details_table"
class="row">
<div t-attf-class="#{'col-7' if report_type != 'html' else 'col-sm-7 col-md-6'} mt-2 mb-2">
<table class="table table-sm"
style="page-break-inside: avoid;">
<th class="border-black text-start">
Due Date
</th>
<th class="border-black text-end">
Amount Due
</th>
<th t-if="o.show_discount_details"
class="border-black text-end">
Discount
</th>
<t t-foreach="payment_term_details"
t-as="term">
<tr>
<td t-esc="term.get('date')"
class="text-start"/>
<td t-options='{"widget": "monetary", "display_currency": o.currency_id}'
t-esc="term.get('amount')"
class="text-end"/>
<td t-if="term.get('discount_date')"
class="text-end">
<span t-options='{"widget": "monetary", "display_currency": o.currency_id}'
t-esc="term.get('discount_amount_currency')"/>
if paid before
<span t-esc="term.get('discount_date')"/>
</td>
</tr>
</t>
</table>
</div>
</div>
</t>
<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>
<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 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>
</t>
<div id="qrcode"
t-if="(o.company_id.qr_code) and (o.currency_id.name == 'EUR') and (o.invoice_partner_bank_id.acc_number != False)">
<p t-if="(o.invoice_partner_bank_id.qr_code_valid)">
<strong class="text-center">Scan me with your
banking app.
t-if="o.display_qr_code and o.amount_residual > 0">
<t t-set="qr_code_url"
t-value="o._generate_qr_code(silent_errors=True)"/>
<p t-if="qr_code_url">
<strong class="text-center">Scan me with
your banking app.
</strong>
<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 t-if="(o.invoice_partner_bank_id.qr_code_valid == False)">
<strong class="text-center">The SEPA QR Code
information are not set correctly.
</strong>
t-att-src="qr_code_url"/>
</p>
</div>
</div>
</div>
</div>
</t>
</template>
</data>

201
invoice_format_editor/reports/old_standard_invoice_templates.xml

@ -10,7 +10,8 @@
<t t-set="company" t-value="res_company"/>
</t>
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})"/>
<t t-set="o"
t-value="o.with_context({'lang':o.partner_id.lang})"/>
<div class="page">
<!--Customer Address-->
<div t-if="o.theme_id.address"
@ -24,31 +25,7 @@
<div>
<span t-if="o.partner_id">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id"/>
</span>
</div>
<div>
<span t-if="o.partner_id.street">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.street"/>
</span>
</div>
<div>
<span t-if="o.partner_id.street2">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.street2"/>
</span>
</div>
<div t-if="o.theme_id.city">
<span t-if="o.partner_id.city">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.city"/>
</span>
</div>
<div t-if="o.theme_id.country">
<span t-if="o.partner_id.country_id">
<span style="color:#{o.theme_id.customer_text_color} !important;"
t-field="o.partner_id.country_id"/>
t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
</span>
</div>
<div t-if="o.theme_id.vat">
@ -61,7 +38,7 @@
</div>
</div>
</div>
<br/><br/>
<br/>
<!--Invoice details-->
<div class="page">
<div t-attf-style=" background-color:#{company.document_layout_id.base_color};padding:2% ;color:#{company.document_layout_id.customer_text_color};">
@ -104,9 +81,11 @@
</font>
</span>
<font>
<span t-field="o.name" t-attf-style="color:#{o.theme_id.heading_text_color}"/>
<span t-field="o.name"
t-attf-style="color:#{o.theme_id.heading_text_color}"/>
</font>
</h2><br/>
</h2>
<br/>
<div id="invoice_information">
<div class="row mt32 mb32" id="informations">
<div class="col-auto col-3 mw-100 mb-2"
@ -115,7 +94,8 @@
<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}"
<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"
@ -124,7 +104,8 @@
<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}"
<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"
@ -133,7 +114,8 @@
<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}"
<p class="m-0"
t-attf-style="color:#{o.theme_id.text_color}"
t-field="o.invoice_payment_term_id"/>
</div>
<!--optional information-->
@ -259,25 +241,37 @@
<div id="total" class="row">
<div t-attf-class="#{'col-6' if report_type != 'html' else 'col-sm-7 col-md-6'} ms-auto">
<table class="table table-sm table-borderless">
<t t-set="tax_totals" t-value="o.tax_totals"/>
<t t-foreach="tax_totals['subtotals']" t-as="subtotal">
<t t-set="tax_totals"
t-value="o.tax_totals"/>
<t t-foreach="tax_totals['subtotals']"
t-as="subtotal">
<tr class="border-black o_subtotal">
<td><strong t-esc="subtotal['name']" t-attf-style="color:#{o.theme_id.text_color}"/></td>
<td>
<strong t-esc="subtotal['name']"
t-attf-style="color:#{o.theme_id.text_color}"/>
</td>
<td class="text-end" t-attf-style="color:#{o.theme_id.text_color}">
<td class="text-end"
t-attf-style="color:#{o.theme_id.text_color}">
<span t-attf-style="color:#{o.theme_id.text_color}"
t-att-class="oe_subtotal_footer_separator"
t-esc="subtotal['formatted_amount']"/>
</td>
</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>
<!--Total amount with all taxes-->
<tr class="border-black o_total">
<td><strong t-attf-style="color:#{o.theme_id.customer_text_color}">Total</strong></td>
<td>
<strong t-attf-style="color:#{o.theme_id.customer_text_color}">
Total
</strong>
</td>
<td class="text-end">
<span t-esc="tax_totals['formatted_amount_total']" t-attf-style="color:#{o.theme_id.customer_text_color}"/>
<span t-esc="tax_totals['formatted_amount_total']"
t-attf-style="color:#{o.theme_id.customer_text_color}"/>
</td>
</tr>
<!--Paid amount details-->
@ -285,16 +279,21 @@
<t t-if="o.payment_state != 'invoicing_legacy'">
<t t-set="payments_vals"
t-value="o.sudo().invoice_payments_widget and o.sudo().invoice_payments_widget['content'] or []"/>
<t t-foreach="payments_vals" t-as="payment_vals">
<t t-foreach="payments_vals"
t-as="payment_vals">
<tr>
<td>
<i class="oe_form_field text-end oe_payment_label" t-attf-style="color:#{o.theme_id.text_color}">Paid on
<i class="oe_form_field text-end oe_payment_label"
t-attf-style="color:#{o.theme_id.text_color}">
Paid on
<t
t-esc="payment_vals['date']"
t-options='{"widget": "date"}' t-attf-style="color:#{o.theme_id.text_color}"/>
t-options='{"widget": "date"}'
t-attf-style="color:#{o.theme_id.text_color}"/>
</i>
</td>
<td class="text-end" t-attf-style="color:#{o.theme_id.text_color}">
<td class="text-end"
t-attf-style="color:#{o.theme_id.text_color}">
<span t-esc="payment_vals['amount']"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
@ -303,10 +302,13 @@
<t t-if="len(payments_vals) > 0">
<tr class="border-black o_total">
<td>
<strong t-attf-style="color:#{o.theme_id.customer_text_color}">Amount Due</strong>
<strong t-attf-style="color:#{o.theme_id.customer_text_color}">
Amount Due
</strong>
</td>
<td class="text-end">
<span t-field="o.amount_residual" t-attf-style="color:#{o.theme_id.customer_text_color}"/>
<span t-field="o.amount_residual"
t-attf-style="color:#{o.theme_id.customer_text_color}"/>
</td>
</tr>
</t>
@ -315,51 +317,98 @@
</table>
</div>
</div>
<!--More details-->
<div t-attf-style="color:#{o.theme_id.text_color};padding-top:10%;"
class="col-12">
<p t-if="o.move_type in ('out_invoice', 'in_refund') and o.payment_reference"
name="payment_communication"
class="mt-4">
Please use the following communication
for
your
payment :
<b>
<span t-field="o.payment_reference"/>
</b>
</p>
<t t-set="payment_term_details"
t-value="o.payment_term_details"/>
<div t-field="o.invoice_payment_term_id.note"
name="payment_term"/>
<t t-if="o.invoice_payment_term_id.display_on_invoice and payment_term_details">
<div t-if='o.show_payment_term_details'
id="total_payment_term_details_table"
class="row">
<div t-attf-class="#{'col-7' if report_type != 'html' else 'col-sm-7 col-md-6'} mt-2 mb-2">
<table class="table table-sm"
style="page-break-inside: avoid;">
<th class="border-black text-start">
Due Date
</th>
<th class="border-black text-end">
Amount Due
</th>
<th t-if="o.show_discount_details"
class="border-black text-end">
Discount
</th>
<t t-foreach="payment_term_details"
t-as="term">
<tr>
<td t-esc="term.get('date')"
class="text-start"/>
<td t-options='{"widget": "monetary", "display_currency": o.currency_id}'
t-esc="term.get('amount')"
class="text-end"/>
<td t-if="term.get('discount_date')"
class="text-end">
<span t-options='{"widget": "monetary", "display_currency": o.currency_id}'
t-esc="term.get('discount_amount_currency')"/>
if paid before
<span t-esc="term.get('discount_date')"/>
</td>
</tr>
</t>
</table>
</div>
</div>
<!--More details-->
<div t-attf-style="color:#{o.theme_id.text_color};padding-top:10%;" class="col-12">
<p t-if="not is_html_empty(o.narration)">
<strong>Comment:</strong>
</t>
<div t-if="not is_html_empty(o.narration)"
name="comment">
<span t-field="o.narration"/>
</p>
<p t-if="o.fiscal_position_id.note">
<strong>Fiscal Position Remark:</strong>
<span t-field="o.fiscal_position_id.note"/>
</p>
<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">
</div>
<p t-if="not is_html_empty(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 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>
</t>
<div id="qrcode"
t-if="(o.company_id.qr_code) and (o.currency_id.name == 'EUR') and (o.invoice_partner_bank_id.acc_number != False)">
<p t-if="(o.invoice_partner_bank_id.qr_code_valid)">
<strong class="text-center">Scan me with your banking app.</strong>
<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 t-if="(o.invoice_partner_bank_id.qr_code_valid == False)">
<strong class="text-center">The SEPA QR Code information are not set correctly.
t-if="o.display_qr_code and o.amount_residual > 0">
<t t-set="qr_code_url"
t-value="o._generate_qr_code(silent_errors=True)"/>
<p t-if="qr_code_url">
<strong class="text-center">Scan me
with
your banking app.
</strong>
<br/>
<br/>
<img class="border border-dark rounded"
t-att-src="qr_code_url"/>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
</data>

Loading…
Cancel
Save