summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorDemaret Rivarola Johan <jde@odoo.com>2018-09-24 14:54:26 +0200
committerToufik Benjaa <tbe@odoo.com>2018-09-26 14:50:17 +0200
commit1803571bdb3545df527ade6dacca8809a5209f73 (patch)
treea98409fcc2e868f666672f43321c2c07b24cc027 /addons
parent2f2b5ead7c4eff8fef6eaf1f62662f73d45eda89 (diff)
[FIX] payment: always redirect when using wire transfer
The user should always be redirected when paying with wire transfer. This is because the landing page displays useful data such as the communication. Closes #27194
Diffstat (limited to 'addons')
-rw-r--r--addons/payment/controllers/portal.py1
-rw-r--r--addons/payment/static/src/js/payment_processing.js4
-rw-r--r--addons/website_event_sale/static/src/js/website.tour.event_sale.js5
-rw-r--r--addons/website_sale/static/src/js/website_sale_tour_buy.js5
4 files changed, 5 insertions, 10 deletions
diff --git a/addons/payment/controllers/portal.py b/addons/payment/controllers/portal.py
index 057ee72aa3b..c3a45c3c6bd 100644
--- a/addons/payment/controllers/portal.py
+++ b/addons/payment/controllers/portal.py
@@ -268,6 +268,7 @@ class WebsitePayment(http.Controller):
else:
status = 'danger'
message = tx.acquirer_id.error_msg
+ PaymentProcessing.remove_payment_transaction(tx)
return request.render('payment.confirm', {'tx': tx, 'status': status, 'message': message})
else:
return request.redirect('/my/home')
diff --git a/addons/payment/static/src/js/payment_processing.js b/addons/payment/static/src/js/payment_processing.js
index 196e694399e..3497297d665 100644
--- a/addons/payment/static/src/js/payment_processing.js
+++ b/addons/payment/static/src/js/payment_processing.js
@@ -85,6 +85,10 @@ odoo.define('payment.processing', function (require) {
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);
}
});
diff --git a/addons/website_event_sale/static/src/js/website.tour.event_sale.js b/addons/website_event_sale/static/src/js/website.tour.event_sale.js
index c6dafbb019e..4686e9595b0 100644
--- a/addons/website_event_sale/static/src/js/website.tour.event_sale.js
+++ b/addons/website_event_sale/static/src/js/website.tour.event_sale.js
@@ -86,11 +86,6 @@ tour.register('event_buy_tickets', {
trigger: 'button[id="o_payment_form_pay"]:visible',
},
{
- content: "Payment processing",
- trigger: 'a[class="list-group-item"]',
- timeout: 5000,
- },
- {
content: "Last step",
trigger: '.oe_website_sale:contains("Pending... The order will be validated after the payment.")',
timeout: 30000,
diff --git a/addons/website_sale/static/src/js/website_sale_tour_buy.js b/addons/website_sale/static/src/js/website_sale_tour_buy.js
index 74a307a480b..b16eaf8638b 100644
--- a/addons/website_sale/static/src/js/website_sale_tour_buy.js
+++ b/addons/website_sale/static/src/js/website_sale_tour_buy.js
@@ -79,11 +79,6 @@ tour.register('shop_buy_product', {
trigger: 'button[id="o_payment_form_pay"]:visible:not(:disabled)',
},
{
- content: "Payment processing",
- trigger: 'a[class="list-group-item"]',
- timeout: 5000,
- },
- {
content: "finish",
trigger: '.oe_website_sale:contains("Pending... The order will be validated after the payment.")',
timeout: 30000,