diff --git a/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientListScreen.js b/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientListScreen.js index 9c18b677c3b..0b0be008067 100644 --- a/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientListScreen.js +++ b/addons/point_of_sale/static/src/js/Screens/ClientListScreen/ClientListScreen.js @@ -6,6 +6,7 @@ odoo.define('point_of_sale.ClientListScreen', function(require) { const { useListener } = require('web.custom_hooks'); const { Observer, debounce } = owl; + const { isConnectionError } = require('point_of_sale.utils'); /** * Render this screen using `showTempScreen` to select client. @@ -163,7 +164,7 @@ odoo.define('point_of_sale.ClientListScreen', function(require) { this.state.detailIsShown = false; this.render(); } catch (error) { - if (error.message.code < 0) { + if (isConnectionError(error)) { await this.showPopup('OfflineErrorPopup', { title: this.env._t('Offline'), body: this.env._t('Unable to save changes.'),