Update bom_items_and_scraps.py

This commit is contained in:
rohitwaghchaure 2019-05-16 15:03:30 +05:30 committed by GitHub
parent 39c80789c9
commit 144e60a234
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,10 +14,11 @@ def execute(filters=None):
def get_data(filters, data):
get_exploded_items(filters.bom, data)
def get_exploded_items(bom, data, indent=1):
exploded_items = frappe.get_all("BOM Item", filters={"parent": bom}, fields= ['qty','bom_no','qty','scrap','item_code','item_name','description','uom'])
exploded_items = frappe.get_all("BOM Item",
filters={"parent": bom},
fields= ['qty','bom_no','qty','scrap','item_code','item_name','description','uom'])
for item in exploded_items:
item["indent"] = indent
data.append({