[FIX] sale: display reversed badge for reversed invoice in portal

Steps:
- Install sales app.
- Create SO and add a product.
- Confirm that SO and create invoice and post it.
- Reverse that invoice via adding credit note.
- Go to portal view of that SO.

Issue:
- `Waiting Payment` badge is displaying instead of
`Paid` as invoice is reversed

Cause:
- Only to payment status added to display `Paid` badge.

Fix:
- Add `Reversed` bagde in portal and display reversed badge
when  payment_state is in reversed state.

opw-3677622

closes odoo/odoo#158418

X-original-commit: a4ae44c81f2a6ccb57844415012a8818a08daa2c
Signed-off-by: Kartik Chavda (kcv) <kcv@odoo.com>
This commit is contained in:
kcv-odoo
2024-03-21 05:56:29 +00:00
parent fc34baedfa
commit 91b43f3999
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -452,6 +452,11 @@ msgstr ""
msgid "<i class=\"fa fa-fw fa-check\"/> Paid"
msgstr ""
#. module: sale
#: model_terms:ir.ui.view,arch_db:sale.sale_order_portal_content
msgid "<i class=\"fa fa-fw fa-check\"/> Reversed"
msgstr ""
#. module: sale
#: model_terms:ir.ui.view,arch_db:sale.portal_my_quotations
msgid "<i class=\"fa fa-fw fa-clock-o\"/> Expired"
@@ -499,6 +499,9 @@
<div t-if="i.payment_state in ('paid', 'in_payment')" class="small badge text-bg-success orders_label_text_align">
<i class="fa fa-fw fa-check"/> Paid
</div>
<div t-elif="i.payment_state == 'reversed'" class="small badge text-bg-success orders_label_text_align">
<i class="fa fa-fw fa-check"/> Reversed
</div>
<div t-elif="authorized_tx_ids" class="small badge text-bg-success orders_label_text_align">
<i class="fa fa-fw fa-check"/> Authorized
</div>