[IMP] point_of_sale: make the order flush timeout dependant on the number of orders...
authorFrédéric van der Essen <fva@openerp.com>
Mon, 24 Feb 2014 14:41:43 +0000 (15:41 +0100)
committerFrédéric van der Essen <fva@openerp.com>
Mon, 24 Feb 2014 14:41:43 +0000 (15:41 +0100)
bzr revid: fva@openerp.com-20140224144143-4fhlswjk2y4skd6j

addons/point_of_sale/static/src/js/models.js

index 90aa5fe..6c65b0b 100644 (file)
@@ -457,7 +457,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
             options = options || {};
 
             var self = this;
-            var timeout = typeof options.timeout === 'number' ? options.timeout : 7500;
+            var timeout = typeof options.timeout === 'number' ? options.timeout : 7500 * orders.length;
 
             // we try to send the order. shadow prevents a spinner if it takes too long. (unless we are sending an invoice,
             // then we want to notify the user that we are waiting on something )