mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
Merge pull request #19974 from rohitwaghchaure/not_able_to_make_work_order_from_bom
fix: not able to make work order from BOM
This commit is contained in:
@@ -619,8 +619,9 @@ def make_work_order(item, qty=0, project=None):
|
|||||||
wo_doc = frappe.new_doc("Work Order")
|
wo_doc = frappe.new_doc("Work Order")
|
||||||
wo_doc.production_item = item
|
wo_doc.production_item = item
|
||||||
wo_doc.update(item_details)
|
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()
|
wo_doc.get_items_and_operations_from_bom()
|
||||||
|
|
||||||
return wo_doc
|
return wo_doc
|
||||||
|
|||||||
Reference in New Issue
Block a user