[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
This commit is contained in:
lejeune quentin
2018-07-13 15:23:09 +02:00
committed by Martin Trigaux
parent 7d34f0218b
commit 9a3b0d70be
@@ -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;