diff options
| author | fda-odoo <fda@odoo.com> | 2018-01-12 17:27:07 +0100 |
|---|---|---|
| committer | fda-odoo <fda@odoo.com> | 2018-01-24 15:41:31 +0100 |
| commit | 4fc96f9795b97ff357e8fb655263cda23258ba22 (patch) | |
| tree | ffba7a493e85c41226d54bff22b835ff10d6819c /addons/account_payment/controllers/payment.py | |
| parent | 2bd17285ea3bcde5c86d8cd925070b048ce39082 (diff) | |
[FIX] account_payment, sale_payment: stop propagation of status message in URL after payment
We only want to keep the access_token from the URL and not all the error and success messages.
Diffstat (limited to 'addons/account_payment/controllers/payment.py')
| -rw-r--r-- | addons/account_payment/controllers/payment.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/account_payment/controllers/payment.py b/addons/account_payment/controllers/payment.py index 80924b910bd..2916a512b51 100644 --- a/addons/account_payment/controllers/payment.py +++ b/addons/account_payment/controllers/payment.py @@ -94,9 +94,9 @@ class PaymentPortal(http.Controller): # proceed to the payment res = tx.confirm_invoice_token() - if res is not True: - params['error'] = res - return request.redirect(_build_url_w_params(error_url, params)) - - params['success'] = 'pay_invoice' + if tx.state != 'authorized' or not tx.acquirer_id.capture_manually: + if res is not True: + params['error'] = res + return request.redirect(_build_url_w_params(error_url, params)) + params['success'] = 'pay_invoice' return request.redirect(_build_url_w_params(success_url, params)) |
