diff --git a/addons/point_of_sale/static/src/js/Screens/PaymentScreen/PaymentScreen.js b/addons/point_of_sale/static/src/js/Screens/PaymentScreen/PaymentScreen.js index c9dea799140..efad114c1bf 100644 --- a/addons/point_of_sale/static/src/js/Screens/PaymentScreen/PaymentScreen.js +++ b/addons/point_of_sale/static/src/js/Screens/PaymentScreen/PaymentScreen.js @@ -211,9 +211,7 @@ odoo.define('point_of_sale.PaymentScreen', function (require) { } } } catch (error) { - hasError = true; - - if (error.code == 700) + if (error.code == 700 || error.code == 701) this.error = true; if ('code' in error) { diff --git a/addons/point_of_sale/static/src/js/custom_hooks.js b/addons/point_of_sale/static/src/js/custom_hooks.js index b2131f398cd..180cbcdf177 100644 --- a/addons/point_of_sale/static/src/js/custom_hooks.js +++ b/addons/point_of_sale/static/src/js/custom_hooks.js @@ -38,13 +38,24 @@ odoo.define('point_of_sale.custom_hooks', function (require) { this.env._t('The server encountered an error while receiving your order.'), }); } else if (error.code === 700) { - // Fiscal module errors + // Sweden Fiscal module errors await this.showPopup('ErrorPopup', { title: this.env._t('Fiscal data module error'), body: error.data.error.status || this.env._t('The fiscal data module encountered an error while receiving your order.'), }); + } else if (error.code === 701) { + // Belgian Fiscal module errors + let bodyMessage = ""; + if(error.error.errorCode) + bodyMessage = "'" + error.error.errorCode + "': " + error.error.errorMessage; + else + bodyMessage = "Fiscal data module is not on."; + await this.showPopup('ErrorPopup', { + title: this.env._t('Fiscal data module error'), + body: bodyMessage + }); } else { // ??? await this.showPopup('ErrorPopup', {