diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index d322a8d9bc4e03a84faa5d2622cf386ab3d43054..e27507488ce2b7925de1776b99d158d27f78bda1 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -993,9 +993,8 @@ def make_material_request(source_name, target_doc=None): "delivery_date": "schedule_date", "bom_no": "bom_no", }, - "condition": lambda item: not is_product_bundle( - item.item_code, product_bundle_name=item.get("product_bundle_name") - ) + "condition": lambda item: item.item_code + and not is_product_bundle(item.item_code, product_bundle_name=item.get("product_bundle_name")) and get_remaining_qty(item) > 0, "postprocess": update_item, },