From 95f3847244ee84bbfe1e641012f140bdce8d0d66 Mon Sep 17 00:00:00 2001 From: Frederic van der Essen Date: Tue, 12 Mar 2013 16:06:38 +0100 Subject: [PATCH] [FIX] point_of_sale: potentially improve performance when loading lots of categories bzr revid: fred@pc-fred.localhost-20130312150638-s980pt6pezi16x2j --- addons/point_of_sale/static/src/js/db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js index 2be58d6ce97..a79b111b5c5 100644 --- a/addons/point_of_sale/static/src/js/db.js +++ b/addons/point_of_sale/static/src/js/db.js @@ -178,7 +178,7 @@ function openerp_pos_db(instance, module){ var ancestors = this.get_category_ancestors_ids(categ_id) || []; - for(var j = 0; j < ancestors.length; j++){ + for(var j = 0, jlen = ancestors.length; j < jlen; j++){ var ancestor = ancestors[j]; if(! stored_categories[ancestor]){ stored_categories[ancestor] = [];