summaryrefslogtreecommitdiff
path: root/addons/account
diff options
context:
space:
mode:
authorCsaba Tóth <csaba.toth@i3rendszerhaz.hu>2020-04-03 19:06:48 +0000
committerqdp-odoo <qdp@odoo.com>2020-04-15 13:35:16 +0000
commitdff06e82b371c8b9610b7f4c5bfdf35fee3b7d7e (patch)
tree813e704fc9887b21ada3835f2dcf819082aad545 /addons/account
parenta6026eb71d77172249c4f0e9c08ccaf85c038f74 (diff)
[FIX] account.invoice: leftovers of the state / invoice_payment_state
refactoring this fixes bugs introduced by https://github.com/odoo/odoo/commit/beaa30a3d1843de43a45f419bfbc1bfa7613a920 in saas-13.2, the field invoice_payment_state was renamed into payment_state by https://github.com/odoo/odoo/commit/8e4158af810bcf475214946fa64d3b0ce4d3b26d in saas-13.4, the feature post_at of journal have been removed by https://github.com/odoo/odoo/commit/caeb782841fc5a7ad71a196e2c9ee67644ef9074 closes odoo/odoo#49569 X-original-commit: 2001c413ee142c50ca6549cd5dff9fc0f9f1637b Signed-off-by: Csaba Tóth <csaba.toth@i3rendszerhaz.hu> Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Diffstat (limited to 'addons/account')
-rw-r--r--addons/account/views/account_portal_templates.xml10
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/account/views/account_portal_templates.xml b/addons/account/views/account_portal_templates.xml
index 620c4ff33e5..d119735e37a 100644
--- a/addons/account/views/account_portal_templates.xml
+++ b/addons/account/views/account_portal_templates.xml
@@ -6,7 +6,7 @@
<t t-else="">Invoices &amp; Bills</t>
</li>
<li t-if="invoice" class="breadcrumb-item active">
- <t t-esc="invoice.name" t-if="invoice.name"/>
+ <t t-esc="invoice.name" t-if="invoice.name != '/'"/>
<t t-else=""><em>Draft Invoice</em></t>
</li>
</xpath>
@@ -47,17 +47,17 @@
<tr>
<td>
<a t-att-href="invoice.get_portal_url()" t-att-title="invoice.name">
- <t t-esc="invoice.name" t-if="invoice.name"/>
+ <t t-esc="invoice.name" t-if="invoice.name != '/'"/>
<em t-else="">Draft Invoice</em>
</a>
</td>
<td><span t-field="invoice.invoice_date"/></td>
<td class='d-none d-md-table-cell'><span t-field="invoice.invoice_date_due"/></td>
<td class="tx_status">
- <t t-if="invoice.state == 'open'">
+ <t t-if="invoice.state == 'posted' and invoice.payment_state != 'paid'">
<span class="badge badge-pill badge-info"><i class="fa fa-fw fa-clock-o" aria-label="Opened" title="Opened" role="img"></i><span class="d-none d-md-inline"> Waiting for Payment</span></span>
</t>
- <t t-if="invoice.state == 'paid'">
+ <t t-if="invoice.state == 'posted' and invoice.payment_state == 'paid'">
<span class="badge badge-pill badge-success"><i class="fa fa-fw fa-check" aria-label="Paid" title="Paid" role="img"></i><span class="d-none d-md-inline"> Paid</span></span>
</t>
<t t-if="invoice.state == 'cancel'">
@@ -89,7 +89,7 @@
<b t-if="invoice.amount_residual > 0" t-field="invoice.amount_residual"/>
<b t-else="1" t-field="invoice.amount_total"/>
</h2>
- <div class="small" t-if="invoice.state != 'paid' and invoice.move_type == 'out_invoice'"><i class="fa fa-clock-o"/><span class="o_portal_sidebar_timeago ml4" t-att-datetime="invoice.invoice_date_due"/></div>
+ <div class="small" t-if="invoice.payment_state != 'paid' and invoice.move_type == 'out_invoice'"><i class="fa fa-clock-o"/><span class="o_portal_sidebar_timeago ml4" t-att-datetime="invoice.invoice_date_due"/></div>
</t>
<t t-set="entries">