From 0261f3e213c25190aa10b18562213cb0885b98a0 Mon Sep 17 00:00:00 2001 From: Nils Hamerlinck Date: Fri, 17 Jan 2020 14:57:14 +0700 Subject: [PATCH] [FIX] pos_timeout: effective timeout should depend on the number of orders --- pos_timeout/static/src/js/pos_timeout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pos_timeout/static/src/js/pos_timeout.js b/pos_timeout/static/src/js/pos_timeout.js index fd8615b9..a1a8787c 100644 --- a/pos_timeout/static/src/js/pos_timeout.js +++ b/pos_timeout/static/src/js/pos_timeout.js @@ -18,8 +18,8 @@ odoo.define('pos_timeout.models', function (require) { _save_to_server: function (orders, options) { // Get PoS Config Settings var timeout = this.config.pos_order_timeout; - if (timeout > 0) { - arguments[1].timeout = timeout * 1000; + if (timeout > 0 && orders && orders.length) { + arguments[1].timeout = timeout * 1000 * orders.length; } return PosModelParent._save_to_server.apply(this, arguments); },