From d14bf7afd881156bf5eb42f1e2b30f8f3a1f0c6c Mon Sep 17 00:00:00 2001 From: "Loan (lse)" Date: Wed, 29 Jun 2022 14:08:02 +0000 Subject: [PATCH] [REV] pos_restaurant: stop closing paymentscreen while paying Revert of https://github.com/odoo/odoo/pull/92794 If you install pos_restaurant and open a PoS sale session, issue will start to appear after a certain time (about 1 minute): For V15: Javascript console logs will log errors: `TypeError: Cannot read properties of undefined (reading 'id') Chrome.js:97` For V15.2: The products button will become unresponsive (so the PoS is unusable). With error in the JS console as well: `TypeError: Cannot read properties of undefined (reading '0') Chrome.js` OPW-2889985 closes odoo/odoo#94938 X-original-commit: 965b797772becba0dbd7b978b5c422ba1474663a Signed-off-by: Joseph Caburnay (jcb) --- addons/pos_restaurant/static/src/js/Chrome.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/pos_restaurant/static/src/js/Chrome.js b/addons/pos_restaurant/static/src/js/Chrome.js index 1f7072a10a9..fdfc05941e9 100644 --- a/addons/pos_restaurant/static/src/js/Chrome.js +++ b/addons/pos_restaurant/static/src/js/Chrome.js @@ -66,8 +66,7 @@ odoo.define('pos_restaurant.chrome', function (require) { this.showScreen('FloorScreen', { floor: table ? table.floor : null }); } _shouldResetIdleTimer() { - const stayPaymentScreen = this.mainScreen.name === 'PaymentScreen' && this.env.pos.get_order().paymentlines.length > 0; - return !stayPaymentScreen && this.mainScreen.name !== 'FloorScreen'; + return this.env.pos.config.iface_floorplan && this.mainScreen.name !== 'FloorScreen'; } __showScreen() { super.__showScreen(...arguments);