From acfab66239681e7adcc53d46cb7e1ac8c6d02527 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 28 Mar 2013 16:47:47 +0530 Subject: [PATCH 1/2] [patch] [fix] substr starts with 1 --- patches/march_2013/p11_update_attach_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/march_2013/p11_update_attach_files.py b/patches/march_2013/p11_update_attach_files.py index 769463a590..ef39ce89f8 100644 --- a/patches/march_2013/p11_update_attach_files.py +++ b/patches/march_2013/p11_update_attach_files.py @@ -11,6 +11,6 @@ def execute(): else: webnotes.conn.sql("""update `tab%(parent)s` set %(fieldname)s = - if(substr(%(fieldname)s,0,4)='http' or substr(%(fieldname)s, 0, 5)='files', + if(substr(%(fieldname)s,1,4)='http' or substr(%(fieldname)s,1,5)='files', %(fieldname)s, concat('files/', %(fieldname)s))""" % f) \ No newline at end of file From 7ab3267886eb57087ad43ebfe92f2ae37e53a195 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 28 Mar 2013 17:09:23 +0530 Subject: [PATCH 2/2] updated item group limit to 100 --- setup/doctype/item_group/item_group.py | 2 +- website/templates/html/product_group.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/doctype/item_group/item_group.py b/setup/doctype/item_group/item_group.py index ba4ea77504..827eed4f3e 100644 --- a/setup/doctype/item_group/item_group.py +++ b/setup/doctype/item_group/item_group.py @@ -74,7 +74,7 @@ class DocType(DocTypeNestedSet): for d in self.doc.sub_groups: d.count = get_group_item_count(d.name) - self.doc.items = get_product_list_for_group(product_group = self.doc.name, limit=20) + self.doc.items = get_product_list_for_group(product_group = self.doc.name, limit=100) self.parent_groups = get_parent_item_groups(self.doc.name) self.doc.title = self.doc.name diff --git a/website/templates/html/product_group.html b/website/templates/html/product_group.html index 2e80c43c58..510f9946ac 100644 --- a/website/templates/html/product_group.html +++ b/website/templates/html/product_group.html @@ -29,8 +29,8 @@ {{ item }} {% endfor %} - {% if len(items)==20 %} -
Showing top 20
+ {% if len(items)==100 %} +
Showing top 100 items.
{% endif %} {% else %}
No items listed.