[FIX]when there is no product into the POS category it gives an error.
bzr revid: vja@tinyerp.com-20121128062926-qjweapwl8o3l94op
This commit is contained in:
parent
09eccd07dc
commit
f2c8f6d970
|
@ -213,8 +213,10 @@ function openerp_pos_db(instance, module){
|
|||
var stored_products = this.load('products',{});
|
||||
var product_ids = stored_categories[category_id];
|
||||
var list = [];
|
||||
for(var i = 0, len = Math.min(product_ids.length,this.limit); i < len; i++){
|
||||
list.push(stored_products[product_ids[i]]);
|
||||
if (product_ids) {
|
||||
for (var i = 0, len = Math.min(product_ids.length, this.limit); i < len; i++) {
|
||||
list.push(stored_products[product_ids[i]]);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue