Website route for item based on name not item name (#8682)
This commit is contained in:
parent
6b3bc8a8e1
commit
ed56b8afd8
@ -142,7 +142,7 @@ class Item(WebsiteGenerator):
|
||||
|
||||
def make_route(self):
|
||||
if not self.route:
|
||||
return cstr(frappe.db.get_value('Item Group', self.item_group, 'route')) + '/' + self.scrub(self.item_name)
|
||||
return cstr(frappe.db.get_value('Item Group', self.item_group, 'route')) + '/' + self.scrub(self.name)
|
||||
|
||||
def get_parents(self, context):
|
||||
item_group, route = frappe.db.get_value('Item Group', self.item_group, ['name', 'route'])
|
||||
|
Loading…
Reference in New Issue
Block a user