From feee2520933ca46e5934eef91d1a9776f95c32fe Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 17 Jan 2013 13:03:30 +0530 Subject: [PATCH] fixes in website page_name for item --- stock/doctype/item/item.py | 2 +- website/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stock/doctype/item/item.py b/stock/doctype/item/item.py index 38ff797291..cca814ff08 100644 --- a/stock/doctype/item/item.py +++ b/stock/doctype/item/item.py @@ -77,7 +77,7 @@ class DocType: def update_website(self): from website.utils import update_page_name - update_page_name(self.doc, self.doc.item_name) + update_page_name(self.doc, self.doc.name + " " + self.doc.item_name) from website.helpers.product import invalidate_cache_for invalidate_cache_for(self.doc.item_group) diff --git a/website/utils.py b/website/utils.py index 96fbdc8dc9..4dafd08c05 100644 --- a/website/utils.py +++ b/website/utils.py @@ -97,7 +97,7 @@ def page_name(title): import re name = title.lower() name = re.sub('[~!@#$%^&*()<>,."\']', '', name) - return '-'.join(name.split()[:8]) + return '-'.join(name.split()) def update_page_name(doc, title): """set page_name and check if it is unique"""