summaryrefslogtreecommitdiff
path: root/addons/payment/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-03-21 13:58:37 +0100
committerChristophe Simonis <chs@odoo.com>2019-03-21 13:58:37 +0100
commit4eff0af02ef2c182793fce5f32d2d15f53a5fba7 (patch)
tree8790e0051f631240562a9408ccd5e2a5cd64782b /addons/payment/static/src
parent45e3e432a3621cf03a38ce48562eb967f1ff76e0 (diff)
parent6878c9f3424f27df9b07a665f9c0f5ef6e254996 (diff)
[MERGE] forward port branch saas-12.1 up to 6878c9f3424
Diffstat (limited to 'addons/payment/static/src')
-rw-r--r--addons/payment/static/src/js/payment_processing.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/addons/payment/static/src/js/payment_processing.js b/addons/payment/static/src/js/payment_processing.js
index 3497297d665..4397bf134f1 100644
--- a/addons/payment/static/src/js/payment_processing.js
+++ b/addons/payment/static/src/js/payment_processing.js
@@ -81,14 +81,16 @@ odoo.define('payment.processing', function (require) {
'tx_cancel': [],
'tx_error': [],
};
+
+ if (transactions.length > 0 && transactions[0].acquirer_provider == 'transfer') {
+ window.location = transactions[0].return_url;
+ return;
+ }
+
// group the transaction according to their state
transactions.forEach(function (tx) {
var key = 'tx_' + tx.state;
if(key in render_values) {
- if (tx.acquirer_provider === 'transfer') {
- window.location = tx.return_url;
- return;
- }
render_values[key].push(tx);
}
});