From 9a3b0d70be37691bf283caaa51b6fc9f58dfb649 Mon Sep 17 00:00:00 2001 From: lejeune quentin Date: Thu, 12 Jul 2018 16:02:00 +0200 Subject: [PATCH] [FIX] point_of_sale : fix popup for bad VAT number When an error occured server side, it was not properly displayed to the user. A popup with "Your Internet connection is probably down." appeared and behing it, a second, unstyled error contained the real error message. Prevent the server error to be displayed. Switch the order of parameters, the error data is contained in the first argument (to be able to diplay the real error). Fixes #25446 Closes #25753 --- addons/point_of_sale/static/src/js/screens.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 1b59aa34cba..172bd53a152 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1281,7 +1281,8 @@ var ClientListScreenWidget = ScreenWidget.extend({ }) .then(function(partner_id){ self.saved_client_details(partner_id); - },function(type,err){ + },function(err,ev){ + ev.preventDefault(); var error_body = _t('Your Internet connection is probably down.'); if (err.data) { var except = err.data;