summaryrefslogtreecommitdiff
path: root/addons/account/views/report_invoice.xml
diff options
context:
space:
mode:
Diffstat (limited to 'addons/account/views/report_invoice.xml')
-rw-r--r--addons/account/views/report_invoice.xml51
1 files changed, 25 insertions, 26 deletions
diff --git a/addons/account/views/report_invoice.xml b/addons/account/views/report_invoice.xml
index 0f83dee7c39..4a31cff037c 100644
--- a/addons/account/views/report_invoice.xml
+++ b/addons/account/views/report_invoice.xml
@@ -10,13 +10,13 @@
</t>
<div class="page">
<h2>
- <span t-if="o.type == 'out_invoice' and o.state in ('open', 'in_payment', 'paid')">Invoice</span>
+ <span t-if="o.type == 'out_invoice' and o.state == 'posted'">Invoice</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'">Credit Note</span>
<span t-if="o.type == 'in_refund'">Vendor Credit Note</span>
<span t-if="o.type == 'in_invoice'">Vendor Bill</span>
- <span t-field="o.number"/>
+ <span t-field="o.name"/>
</h2>
<div id="informations" class="row mt32 mb32">
@@ -24,17 +24,17 @@
<strong>Description:</strong>
<p class="m-0" t-field="o.name"/>
</div>
- <div class="col-auto mw-100 mb-2" t-if="o.date_invoice" name="invoice_date">
+ <div class="col-auto mw-100 mb-2" t-if="o.invoice_date" name="invoice_date">
<strong>Invoice Date:</strong>
- <p class="m-0" t-field="o.date_invoice"/>
+ <p class="m-0" t-field="o.invoice_date"/>
</div>
- <div class="col-auto mw-100 mb-2" t-if="o.date_due and o.type == 'out_invoice' and o.state in ('open', 'in_payment', 'paid')" name="due_date">
+ <div class="col-auto mw-100 mb-2" t-if="o.invoice_date_due and o.type == 'out_invoice' and o.state in ('open', 'in_payment', 'paid')" name="due_date">
<strong>Due Date:</strong>
- <p class="m-0" t-field="o.date_due"/>
+ <p class="m-0" t-field="o.invoice_date_due"/>
</div>
- <div class="col-auto mw-100 mb-2" t-if="o.origin" name="origin">
+ <div class="col-auto mw-100 mb-2" t-if="o.invoice_origin" name="origin">
<strong>Source:</strong>
- <p class="m-0" t-field="o.origin"/>
+ <p class="m-0" t-field="o.invoice_origin"/>
</div>
<div class="col-auto mw-100 mb-2" t-if="o.partner_id.ref" name="customer_code">
<strong>Customer Code:</strong>
@@ -76,10 +76,9 @@
<tr t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''">
<t t-if="not line.display_type" name="account_invoice_line_accountable">
<td name="account_invoice_line_name"><span t-field="line.name"/></td>
- <td class="d-none"><span t-field="line.origin"/></td>
<td class="text-right">
<span t-field="line.quantity"/>
- <span t-field="line.uom_id" groups="uom.group_uom"/>
+ <span t-field="line.product_uom_id" groups="uom.group_uom"/>
</td>
<td t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span t-field="line.price_unit"/>
@@ -88,7 +87,7 @@
<span t-field="line.discount"/>
</td>
<td t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
- <span t-esc="', '.join(map(lambda x: (x.description or x.name), line.invoice_line_tax_ids))"/>
+ <span t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_ids))"/>
</td>
<td class="text-right o_price_total">
<span t-field="line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
@@ -136,7 +135,7 @@
</tr>
<t t-foreach="o.amount_by_group" t-as="amount_by_group">
<tr style="">
- <t t-if="len(o.tax_line_ids) == 1 and o.amount_untaxed == amount_by_group[2]">
+ <t t-if="len(o.line_ids.filtered(lambda line: line.tax_line_id)) == 1 and o.amount_untaxed == amount_by_group[2]">
<td><span t-esc="amount_by_group[0]"/></td>
<td class="text-right o_price_total">
<span t-esc="amount_by_group[3]" />
@@ -165,24 +164,24 @@
</div>
</div>
</div>
- <p t-if="o.reference">
- Please use the following communication for your payment : <b><span t-field="o.reference"/></b>
+ <p>
+ Please use the following communication for your payment : <b><span t-field="o.invoice_payment_ref"/></b>
</p>
- <p t-if="o.comment" name="comment">
- <span t-field="o.comment"/>
+ <p t-if="o.narration" name="comment">
+ <span t-field="o.narration"/>
</p>
- <p t-if="o.payment_term_id" name="payment_term">
- <span t-field="o.payment_term_id.note"/>
+ <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>
- <div id="qrcode" t-if="(o.partner_id.country_id.code in ['BE', 'AT', 'DE', 'FI', 'NL']) and (o.company_id.qr_code) and (o.currency_id.name == 'EUR') and (o.partner_bank_id.acc_number != False)">
- <p t-if="(o.partner_bank_id.qr_code_valid)">
+ <div id="qrcode" t-if="(o.partner_id.country_id.code in ['BE', 'AT', 'DE', 'FI', 'NL']) and (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.partner_bank_id.build_qr_code_url(o.residual,(o.reference) if (o.reference) else o.number)"/>
+ <img class="border border-dark rounded" t-att-src="o.invoice_partner_bank_id.build_qr_code_url(o.amount_residual,(o.ref) if (o.ref) else o.name)"/>
</p>
- <p t-if="(o.partner_bank_id.qr_code_valid == False)">
+ <p t-if="(o.invoice_partner_bank_id.qr_code_valid == False)">
<strong class="text-center">The SEPA QR Code informations are not set correctly.</strong><br />
</p>
</div>
@@ -192,7 +191,7 @@
<template id="report_invoice_document_with_payments" inherit_id="account.report_invoice_document" primary="True">
<xpath expr="//div[@id='total']/div/table" position="inside">
- <t t-set="payments_vals" t-value="o._get_payments_vals()"/>
+ <t t-set="payments_vals" t-value="o._get_reconciled_info_JSON_values()"/>
<t t-foreach="payments_vals" t-as="payment_vals">
<tr>
<td>
@@ -207,7 +206,7 @@
<tr class="border-black">
<td><strong>Amount Due</strong></td>
<td class="text-right">
- <span t-field="o.residual"/>
+ <span t-field="o.amount_residual"/>
</td>
</tr>
</t>
@@ -217,7 +216,7 @@
<template id="report_invoice">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
- <t t-set="lang" t-value="o.user_id.lang if o.type in ('in_invoice', 'in_refund') else o.partner_id.lang"/>
+ <t t-set="lang" t-value="o.invoice_user_id.lang if o.type in ('in_invoice', 'in_refund') else o.partner_id.lang"/>
<t t-call="account.report_invoice_document" t-lang="lang"/>
</t>
</t>
@@ -226,7 +225,7 @@
<template id="report_invoice_with_payments">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
- <t t-set="lang" t-value="o.user_id.lang if o.type in ('in_invoice', 'in_refund') else o.partner_id.lang"/>
+ <t t-set="lang" t-value="o.invoice_user_id.lang if o.type in ('in_invoice', 'in_refund') else o.partner_id.lang"/>
<t t-call="account.report_invoice_document_with_payments" t-lang="lang"/>
</t>
</t>