fix: not able to make work order from BOM

This commit is contained in:
Rohit Waghchaure 2019-12-17 18:13:54 +05:30
parent 5d0c42e2a1
commit 4203eb4ee1

View File

@ -657,8 +657,9 @@ def make_work_order(item, qty=0, project=None):
wo_doc = frappe.new_doc("Work Order")
wo_doc.production_item = item
wo_doc.update(item_details)
if qty > 0:
wo_doc.qty = qty
if flt(qty) > 0:
wo_doc.qty = flt(qty)
wo_doc.get_items_and_operations_from_bom()
return wo_doc