From a9b192126fbe4a2fd8f14162d7324cb985c1c564 Mon Sep 17 00:00:00 2001 From: Admin Date: Wed, 15 Jan 2025 13:00:11 +0530 Subject: [PATCH] feat: company filter in material request project field --- .../stock/doctype/material_request/material_request.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index 267173845a12..90bf4829fc15 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -43,6 +43,14 @@ frappe.ui.form.on("Material Request", { }; }); + frm.set_query("project", "items", function (doc, cdt, cdn) { + return { + filters: { + company: doc.company, + }, + }; + }); + var list = frm.fields_dict['items'].grid.get_field('work_breakdown_structure').get_query = function (doc, cdt, cdn) { var child = locals[cdt][cdn]; return {