Update production_plan.py

This commit is contained in:
Nabin Hait 2019-02-05 10:34:58 +05:30 committed by GitHub
parent d442d06947
commit fe6f1ad244
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -567,12 +567,8 @@ def get_items_for_material_requests(doc, sales_order=None, company=None):
else: else:
item_details = get_subitems(doc, data, item_details, bom_no, company, item_details = get_subitems(doc, data, item_details, bom_no, company,
include_non_stock_items, include_subcontracted_items, 1, planned_qty=planned_qty) include_non_stock_items, include_subcontracted_items, 1, planned_qty=planned_qty)
else: elif data.get('item_code'):
if data['item_code']:
item_master = frappe.get_doc('Item', data['item_code']).as_dict() item_master = frappe.get_doc('Item', data['item_code']).as_dict()
else:
frappe.throw(_("Please select items first"))
purchase_uom = item_master.purchase_uom or item_master.stock_uom purchase_uom = item_master.purchase_uom or item_master.stock_uom
conversion_factor = 0 conversion_factor = 0
for d in item_master.get("uoms"): for d in item_master.get("uoms"):