[dashboard] for quotation and sales order

This commit is contained in:
Rushabh Mehta
2016-07-20 18:55:42 +05:30
parent 649e2538e5
commit 39077d4210
4 changed files with 49 additions and 4 deletions

View File

@@ -17,9 +17,10 @@ class Homepage(Document):
for d in frappe.get_all('Item', fields=['name', 'item_name', 'description', 'image'],
filters={'show_in_website': 1}, limit=3):
# set missing routes (?)
doc = frappe.get_doc('Item', d.name)
doc.save()
if not doc.route:
# set missing route
doc.save()
self.append('products', dict(item_code=d.name,
item_name=d.item_name, description=d.description, image=d.image))