[FIX] payment: fix rpc.fail in payment form

Parameters of the rpc.fail is changed because of this commit : https://github.com/odoo/odoo/commit/fc5d030ef2695f7d2daeb87db9697240be4b99d4#diff-c52e0c611c3001980c7a7be0f6395e60R80

This commit is related to Task ID: 1869500
Closes #26052
This commit is contained in:
Nikunj Ladava
2018-07-31 16:45:03 +02:00
committed by RomainLibert
parent a719cf2563
commit 8be798375e
+4 -4
View File
@@ -125,7 +125,7 @@ odoo.define('payment.payment_form', function (require) {
$(button).attr('disabled', false);
$(button).children('.fa').addClass('fa-plus-circle')
$(button).find('span.o_loader').remove();
}).fail(function (message, data) {
}).fail(function (data, event) {
// if the rpc fails, pretty obvious
$(button).attr('disabled', false);
$(button).children('.fa').addClass('fa-plus-circle')
@@ -176,7 +176,7 @@ odoo.define('payment.payment_form', function (require) {
_t("We are not able to redirect you to the payment form.")
);
}
}).fail(function (message, data) {
}).fail(function (data, event) {
self.displayError(
_t('Server Error'),
_t("We are not able to redirect you to the payment form. ") +
@@ -292,7 +292,7 @@ odoo.define('payment.payment_form', function (require) {
$(button).attr('disabled', false);
$(button).children('.fa').addClass('fa-plus-circle')
$(button).find('span.o_loader').remove();
}).fail(function (message, data) {
}).fail(function (data, event) {
// if the rpc fails, pretty obvious
$(button).attr('disabled', false);
$(button).children('.fa').addClass('fa-plus-circle')
@@ -364,7 +364,7 @@ odoo.define('payment.payment_form', function (require) {
// if there's no records linked to this payment method, then we delete it
tokenDelete();
}
}, function (type, err) {
}, function (err, event) {
self.displayError(
_t('Server Error'),
_t("We are not able to delete your payment method at the moment.") + err.data.message