From 954f89757235ae390b9c246f420d5adf909aa7de Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 11 Feb 2013 15:55:30 +0530 Subject: [PATCH 1/4] in product listing, don't truncate description --- website/helpers/product.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/website/helpers/product.py b/website/helpers/product.py index 2685d10ed8..32534a5ecb 100644 --- a/website/helpers/product.py +++ b/website/helpers/product.py @@ -91,8 +91,6 @@ def get_item_for_list_in_html(r): def scrub_item_for_list(r): if not r.website_description: r.website_description = "No description given" - if len(r.website_description.split(" ")) > 24: - r.website_description = " ".join(r.website_description.split(" ")[:24]) + "..." r.website_image = url_for_website(r.website_image) def get_parent_item_groups(item_group_name): From ca73b90a0d4f2b444f9494ae1d04c89644dd045c Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 11 Feb 2013 19:32:18 +0530 Subject: [PATCH 2/4] raw material supplied in purchase receipt should be a no copy field --- stock/doctype/purchase_receipt_item/purchase_receipt_item.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt index fd73c879ff..8c20d4cd67 100755 --- a/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt +++ b/stock/doctype/purchase_receipt_item/purchase_receipt_item.txt @@ -2,7 +2,7 @@ { "creation": "2013-02-07 08:28:23", "docstatus": 0, - "modified": "2013-02-08 14:06:15", + "modified": "2013-02-11 08:13:11", "modified_by": "Administrator", "owner": "Administrator" }, @@ -385,6 +385,7 @@ "hidden": 1, "in_filter": 0, "label": "Raw Materials Supplied Cost", + "no_copy": 1, "oldfieldname": "rm_supp_cost", "oldfieldtype": "Currency", "options": "Company:company:default_currency", From d8c3aa22a0360fcd1a41680cd7159d530a59b27a Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 11 Feb 2013 19:33:33 +0530 Subject: [PATCH 3/4] removed product param in get_product_list --- website/helpers/product.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/website/helpers/product.py b/website/helpers/product.py index 32534a5ecb..6cd4a5f83f 100644 --- a/website/helpers/product.py +++ b/website/helpers/product.py @@ -28,9 +28,7 @@ def get_product_info(item_code): } @webnotes.whitelist(allow_guest=True) -def get_product_list(search=None, product_group=None, start=0, limit=10): - # DOUBT: why is product_group param passed? - +def get_product_list(search=None, start=0, limit=10): # base query query = """select name, item_name, page_name, website_image, item_group, web_long_description as website_description @@ -47,7 +45,6 @@ def get_product_list(search=None, product_group=None, start=0, limit=10): data = webnotes.conn.sql(query, { "search": search, - "product_group": product_group }, as_dict=1) return [get_item_for_list_in_html(r) for r in data] From e1ad443c91d41fcd2c00873fce6d18e3a5a33379 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 11 Feb 2013 20:28:56 +0530 Subject: [PATCH 4/4] re-adding description as it is distorting list --- website/helpers/product.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/helpers/product.py b/website/helpers/product.py index 6cd4a5f83f..ef433b1a29 100644 --- a/website/helpers/product.py +++ b/website/helpers/product.py @@ -88,6 +88,8 @@ def get_item_for_list_in_html(r): def scrub_item_for_list(r): if not r.website_description: r.website_description = "No description given" + if len(r.website_description.split(" ")) > 24: + r.website_description = " ".join(r.website_description.split(" ")[:24]) + "..." r.website_image = url_for_website(r.website_image) def get_parent_item_groups(item_group_name):