From ac69fd3f67c3284f9649e7a8dcc66cbb2cb87067 Mon Sep 17 00:00:00 2001 From: roen-odoo Date: Thu, 2 Jun 2022 14:26:56 +0000 Subject: [PATCH] [FIX] pos_restaurant: stop closing paymentscreen while paying Current behavior: If you stay in idle too long on the payment screen while doing a payment the screen would go back to the floor screen Steps to reproduce: - Have PoS installed and setup restaurant - Go in the PoS restaurant - Go in any table add some product and go to payment screen - Click on any payment method - Wait some time and you should go back to the floor screen opw-2849939 closes odoo/odoo#93689 X-original-commit: 3c90b940e4ffa9208517974a6238e64e09f03475 Signed-off-by: Trinh Jacky (trj) Signed-off-by: Engels Robin (roen) --- addons/pos_restaurant/static/src/js/Chrome.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/pos_restaurant/static/src/js/Chrome.js b/addons/pos_restaurant/static/src/js/Chrome.js index fdfc05941e9..1f7072a10a9 100644 --- a/addons/pos_restaurant/static/src/js/Chrome.js +++ b/addons/pos_restaurant/static/src/js/Chrome.js @@ -66,7 +66,8 @@ odoo.define('pos_restaurant.chrome', function (require) { this.showScreen('FloorScreen', { floor: table ? table.floor : null }); } _shouldResetIdleTimer() { - return this.env.pos.config.iface_floorplan && this.mainScreen.name !== 'FloorScreen'; + const stayPaymentScreen = this.mainScreen.name === 'PaymentScreen' && this.env.pos.get_order().paymentlines.length > 0; + return !stayPaymentScreen && this.mainScreen.name !== 'FloorScreen'; } __showScreen() { super.__showScreen(...arguments);