Skip to content

Commit

Permalink
Merge pull request #1039 from 8848digital/company_filter
Browse files Browse the repository at this point in the history
feat: company filter in material request project field
  • Loading branch information
aasif-patel authored Jan 15, 2025
2 parents c8deb23 + a9b1921 commit b7acce9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions erpnext/stock/doctype/material_request/material_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit b7acce9

Please sign in to comment.