|
|
@ -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> |
|
|
|