From 5394f9702be9e9ad05a0a2d4fa4776eaff35240a Mon Sep 17 00:00:00 2001 From: "Antoine Vandevenne (anv)" Date: Wed, 5 Jan 2022 09:18:22 +0000 Subject: [PATCH] [FIX] payment: hide toaster notification for token deletion error Before this commit, a toaster notification would be shown in addition to the dedicated error div in the inline payment form when an exception is raised while trying to archive a payment token. closes odoo/odoo#82420 X-original-commit: ff7368a4d140a5fe7cf995d61847e81c6a7fd65e Signed-off-by: Antoine Vandevenne (anv) --- addons/payment/static/src/js/manage_form.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/payment/static/src/js/manage_form.js b/addons/payment/static/src/js/manage_form.js index ccecfe49bf2..aed87ff4550 100644 --- a/addons/payment/static/src/js/manage_form.js +++ b/addons/payment/static/src/js/manage_form.js @@ -94,6 +94,7 @@ odoo.define('payment.manage_form', require => { this._disableButton(false); } }).guardedCatch(error => { + error.event.preventDefault(); this._displayError( _t("Server Error"), _t("We are not able to delete your payment method."),