diff options
| author | Damien Bouvy <dbo@odoo.com> | 2020-04-16 08:32:20 +0000 |
|---|---|---|
| committer | Damien Bouvy <dbo@odoo.com> | 2020-04-22 16:54:27 +0000 |
| commit | e3021499a4fc1c9d40f2c2f39d601e667e8c3213 (patch) | |
| tree | ee1e70716a16b2515b189af1b5c1838cfcb6a874 /addons/payment | |
| parent | dd9627120834961a546df3017fd7f2595e4762aa (diff) | |
[FIX] payment: handle tx in error in /website_payment/pay
opw-2231276
X-original-commit: 7b62c95d44c0abce9b53b476bb1e65fc873da24d
Diffstat (limited to 'addons/payment')
| -rw-r--r-- | addons/payment/controllers/portal.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/payment/controllers/portal.py b/addons/payment/controllers/portal.py index cefc8ad6d5e..823b254879a 100644 --- a/addons/payment/controllers/portal.py +++ b/addons/payment/controllers/portal.py @@ -331,6 +331,9 @@ class WebsitePayment(http.Controller): elif tx.state == 'pending': status = 'warning' message = tx.acquirer_id.pending_msg + else: + status = 'danger' + message = tx.state_message or _('An error occured during the processing of this payment') PaymentProcessing.remove_payment_transaction(tx) return request.render('payment.confirm', {'tx': tx, 'status': status, 'message': message}) else: |
