[FIX] sale_payment: Pay Now was always hidden in SO panel-heading
Since refactoring of account, payment and sale with commit 01216345 the
`Pay Now` button in the panel-heading of the SO in the portal was always hidden
except if there was a pending transaction.
The button should be visible when there is no transaction. In that case
`payment_tx_id` is an empty recordset, we can safely access its `state` field.
Closes #25529
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<template id="portal_my_orders_payment" name="Payment on my orders" inherit_id="sale.portal_order_page">
|
||||
<xpath expr="//t[@name='portal_confirmation_sign']" position="after">
|
||||
<t t-set="payment_tx_id" t-value="order.get_portal_last_transaction()"/>
|
||||
<t t-if="order.amount_total and not invoices and order.state in ('sent', 'sale') and portal_confirmation == 'pay' and payment_tx_id and payment_tx_id.state != 'done'" name="portal_confirmation_pay">
|
||||
<t t-if="order.amount_total and not invoices and order.state in ('sent', 'sale') and portal_confirmation == 'pay' and payment_tx_id.state != 'done'" name="portal_confirmation_pay">
|
||||
<a class="btn btn-primary ml8 pull-right" href="#portal_pay">
|
||||
<i class="fa fa-arrow-circle-right"/> Pay Now
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user