[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
This commit is contained in:
Demaret Rivarola Johan
2018-09-26 14:50:17 +02:00
committed by Toufik Benjaa
parent 2f2b5ead7c
commit 1803571bdb
4 changed files with 5 additions and 10 deletions
+1
View File
@@ -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')
@@ -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);
}
});
@@ -85,11 +85,6 @@ tour.register('event_buy_tickets', {
extra_trigger: '#payment_method label:contains("Wire Transfer") input:checked,#payment_method:not(:has("input:radio:visible"))',
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.")',
@@ -78,11 +78,6 @@ tour.register('shop_buy_product', {
extra_trigger: '#payment_method label:contains("Wire Transfer") input:checked,#payment_method:not(:has("input:radio:visible"))',
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.")',