Merge pull request #19853 from rohitwaghchaure/fixed_production_plan_items_required_to_pull_mr

fix: 'NoneType' object is not iterable
This commit is contained in:
rohitwaghchaure 2019-12-09 12:31:06 +05:30 committed by GitHub
commit d2f64214cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -615,6 +615,9 @@ def get_items_for_material_requests(doc, ignore_existing_ordered_qty=None):
doc['mr_items'] = []
po_items = doc.get('po_items') if doc.get('po_items') else doc.get('items')
if not po_items:
frappe.throw(_("Items are required to pull the raw materials which is associated with it."))
company = doc.get('company')
warehouse = doc.get('for_warehouse')