fix: correct project filter in buying doctypes (backport #54644) (#54652)

fix: correct project filter in buying doctypes (#54644)

(cherry picked from commit a04c028522)

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
mergify[bot]
2026-04-29 17:28:12 +05:30
committed by GitHub
parent 19a8ebe8a5
commit 86cf256358
4 changed files with 9 additions and 25 deletions

View File

@@ -25,13 +25,15 @@ erpnext.buying = {
};
});
this.frm.set_query("project", function (doc) {
return {
filters: {
company: doc.company,
},
};
});
const project_filters = {
query: "erpnext.controllers.queries.get_project_name",
filters: {
company: doc.company,
},
};
this.frm.set_query("project", (_) => project_filters);
this.frm.set_query("project", "items", (_, __, ___) => project_filters);
if (
this.frm.doc.__islocal &&