summaryrefslogtreecommitdiff
path: root/addons/payment/static/src
diff options
context:
space:
mode:
authorDamien Bouvy <dbo@odoo.com>2020-01-06 10:45:20 +0000
committerDamien Bouvy <dbo@odoo.com>2020-01-06 15:15:38 +0000
commit34226a4feefcb19b2deebf953888a8f048bbd416 (patch)
tree736eab7f9ca37fb08d4b61924693b388be3fbf10 /addons/payment/static/src
parent2691c66dbc56c94c4cd47c8ccafa7e7c6921c2e1 (diff)
[FIX] payment: authorized payment should redirect automatically
From the PoV of the customer, there is no difference between an authorized payment and a captured payment; they should get redirected to the confirmation page in both cases. closes odoo/odoo#42780 X-original-commit: 452676737dd657a5d31a88fa89cc136cbe69b96a Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Diffstat (limited to 'addons/payment/static/src')
-rw-r--r--addons/payment/static/src/js/payment_processing.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/payment/static/src/js/payment_processing.js b/addons/payment/static/src/js/payment_processing.js
index f52d34f6a8c..5ed13cf1ae1 100644
--- a/addons/payment/static/src/js/payment_processing.js
+++ b/addons/payment/static/src/js/payment_processing.js
@@ -94,8 +94,8 @@ odoo.define('payment.processing', function (require) {
return nbTx;
}
// if there's only one tx to manage
- if(countTxInState(['tx_done', 'tx_error', 'tx_pending']) === 1) {
- var tx = render_values['tx_done'][0] || render_values['tx_error'][0];
+ if(countTxInState(['tx_done', 'tx_error', 'tx_pending', 'tx_authorized']) === 1) {
+ var tx = render_values['tx_done'][0] || render_values['tx_authorized'][0] || render_values['tx_error'][0];
if (tx) {
window.location = tx.return_url;
return;