From 39420a319df489a1bf71c9cdcbccce6dd316152a Mon Sep 17 00:00:00 2001 From: bMancone Date: Tue, 17 Jan 2012 15:05:07 +0000 Subject: [PATCH] // Fixed #445 --- .../default/template/controllers/supply_orders/form.tpl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/supply_orders/form.tpl b/admin-dev/themes/default/template/controllers/supply_orders/form.tpl index 707987687..0dd818231 100644 --- a/admin-dev/themes/default/template/controllers/supply_orders/form.tpl +++ b/admin-dev/themes/default/template/controllers/supply_orders/form.tpl @@ -224,9 +224,9 @@ autoFill: true, max:20, matchContains: true, - mustMatch:true, + mustMatch:false, scroll:false, - cacheLength:0, + cacheLength:20, dataType: 'json', extraParams: { id_supplier: '{$supplier_id}', @@ -237,6 +237,8 @@ action : 'searchProduct', }, parse: function(data) { + if (data == null) + return []; var res = $.map(data, function(row) { // filter the data to chaeck if the product is already added to the order if (jQuery.inArray(row.id, product_ids) == -1)