diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index 893701bf16..5351f32186 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -192,6 +192,7 @@ frappe.ui.form.on('Material Request', { var values = d.get_values(); if(!values) return; values["company"] = frm.doc.company; + if(!frm.doc.company) frappe.throw(__("Company field is required")); frappe.call({ method: "erpnext.manufacturing.doctype.bom.bom.get_bom_items", args: values,