mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-03 13:38:27 +00:00
[hub][init] add publish items page
This commit is contained in:
@@ -31,12 +31,18 @@ def get_list(doctype, start=0, limit=20, fields=["*"], filters="{}", order_by=No
|
||||
|
||||
return listing
|
||||
|
||||
|
||||
|
||||
#### LOCAL ITEMS
|
||||
@frappe.whitelist()
|
||||
def get_valid_items():
|
||||
items = frappe.get_list('Item')
|
||||
return items
|
||||
items = frappe.get_list('Item', fields=["*"])
|
||||
valid_items = filter(lambda x: x.image and x.description, items)
|
||||
|
||||
def attach_source_type(item):
|
||||
item.source_type = "local"
|
||||
return item
|
||||
|
||||
valid_items = map(lambda x: attach_source_type(x), valid_items)
|
||||
return valid_items
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_item_favourites(start=0, limit=20, fields=["*"], order_by=None):
|
||||
|
||||
Reference in New Issue
Block a user