summaryrefslogtreecommitdiff
path: root/addons/payment/static/src/js/payment_processing.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-03-25 10:05:27 +0000
committerChristophe Simonis <chs@odoo.com>2019-03-25 11:13:41 +0000
commit5df4746c9aa144e6e3fce44fea43dac1089a5c51 (patch)
treef4ce932a76563e26b8d131805d49b405fcf9ad8f /addons/payment/static/src/js/payment_processing.js
parent39e71353c5d58f7af6b3270911a24d98b73cad4e (diff)
parent230ad8c381e927025efabff0f5f8c2debc432249 (diff)
[MERGE] forward port branch saas-12.2 up to 230ad8c381e
closes odoo/odoo#32088 Signed-off-by: Christophe Simonis <chs@odoo.com>
Diffstat (limited to 'addons/payment/static/src/js/payment_processing.js')
-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 0ee3e934176..0fcfbc7ce81 100644
--- a/addons/payment/static/src/js/payment_processing.js
+++ b/addons/payment/static/src/js/payment_processing.js
@@ -84,14 +84,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);
}
});