[minor] item route is item name + code

This commit is contained in:
Rushabh Mehta 2017-05-08 11:35:40 +05:30
parent 3f7fff04f4
commit a6bc583daf

View File

@ -142,7 +142,8 @@ class Item(WebsiteGenerator):
def make_route(self): def make_route(self):
if not self.route: if not self.route:
return cstr(frappe.db.get_value('Item Group', self.item_group, 'route')) + '/' + self.scrub(self.name) return cstr(frappe.db.get_value('Item Group', self.item_group,
'route')) + '/' + self.scrub(self.item_code + '-' + self.name)
def get_parents(self, context): def get_parents(self, context):
item_group, route = frappe.db.get_value('Item Group', self.item_group, ['name', 'route']) item_group, route = frappe.db.get_value('Item Group', self.item_group, ['name', 'route'])