Merge branch 'develop' into bom-fix
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 8888a96..6363242 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -169,8 +169,8 @@
'qty' : args.get("qty") or args.get("stock_qty") or 1,
'stock_qty' : args.get("qty") or args.get("stock_qty") or 1,
'base_rate' : flt(rate) * (flt(self.conversion_rate) or 1),
- 'include_item_in_manufacturing': cint(args['transfer_for_manufacture']) or 0,
- 'sourced_by_supplier' : args['sourced_by_supplier'] or 0
+ 'include_item_in_manufacturing': cint(args.get('transfer_for_manufacture')),
+ 'sourced_by_supplier' : args.get('sourced_by_supplier', 0)
}
return ret_item