test: allow from_warehouse while creating material request

This commit is contained in:
Navin-S-R
2026-01-10 19:42:09 +05:30
parent 4e6d86d6f0
commit 7e99148357

View File

@@ -1138,7 +1138,8 @@ def make_material_request(**args):
mr = frappe.new_doc("Material Request")
mr.material_request_type = args.material_request_type or "Purchase"
mr.company = args.company or "_Test Company"
mr.customer = args.customer or "_Test Customer"
if mr.material_request_type == "Customer Provided":
mr.customer = args.customer or "_Test Customer"
mr.append(
"items",
{
@@ -1147,6 +1148,7 @@ def make_material_request(**args):
"uom": args.uom or "_Test UOM",
"conversion_factor": args.conversion_factor or 1,
"schedule_date": args.schedule_date or today(),
"from_warehouse": args.from_warehouse,
"warehouse": args.warehouse or "_Test Warehouse - _TC",
"cost_center": args.cost_center or "_Test Cost Center - _TC",
},