Merge pull request #19976 from rohitwaghchaure/not_able_to_make_work_order_from_bom_develop

fix: not able to make work order from BOM
This commit is contained in:
rohitwaghchaure 2019-12-17 19:47:29 +05:30 committed by GitHub
commit 4cde296b83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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