[FIX] point_of_sale: display python except message on partner creation

Having base_vat installed (but is potentially more general than this)

In the pos frontend, try to save a partner with an incorrect VAT

Before this commit, the generic and cryptic message "your internet is probably down" was displayed to the user
when a python exception occured

After this commit, we display the exception's message

OPW 807656
This commit is contained in:
Lucas Perais (lpe)
2018-02-15 10:38:03 +01:00
parent 1605086943
commit 840c3be7b5
@@ -1177,9 +1177,14 @@ var ClientListScreenWidget = ScreenWidget.extend({
self.saved_client_details(partner_id);
},function(err,event){
event.preventDefault();
var error_body = _t('Your Internet connection is probably down.');
if (err.data) {
var except = err.data;
error_body = except.arguments && except.arguments[0] || except.message || error_body;
}
self.gui.show_popup('error',{
'title': _t('Error: Could not Save Changes'),
'body': _t('Your Internet connection is probably down.'),
'body': error_body,
});
});
},