Merge pull request #22470 from marination/production-plan-test
fix: Sales Order to MR test failing
This commit is contained in:
commit
b47218f7b3
@ -643,7 +643,8 @@ def get_items_for_material_requests(doc, warehouses=None):
|
||||
|
||||
doc['mr_items'] = []
|
||||
|
||||
po_items = doc.get('po_items')
|
||||
po_items = doc.get('po_items') if doc.get('po_items') else doc.get('items')
|
||||
# Check for empty table or empty rows
|
||||
if not po_items or not [row.get('item_code') for row in po_items if row.get('item_code')]:
|
||||
frappe.throw(_("Items to Manufacture are required to pull the Raw Materials associated with it."),
|
||||
title=_("Items Required"))
|
||||
|
Loading…
Reference in New Issue
Block a user