Skip to content

Commit

Permalink
fix: set filter to show only submitted asset
Browse files Browse the repository at this point in the history
(cherry picked from commit 69b8e10)
  • Loading branch information
khushi8112 authored and mergify[bot] committed Jul 19, 2024
1 parent 54791e9 commit 29fc975
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions erpnext/assets/doctype/asset_maintenance/asset_maintenance.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@

frappe.ui.form.on("Asset Maintenance", {
setup: (frm) => {
frm.set_query("asset_name", function () {
return {
filters: {
company: frm.doc.company,
docstatus: 1,
},
};
});

frm.set_query("assign_to", "asset_maintenance_tasks", function (doc) {
return {
query: "erpnext.assets.doctype.asset_maintenance.asset_maintenance.get_team_members",
Expand Down

0 comments on commit 29fc975

Please sign in to comment.