From 75344e9e8263ff72a3ce80ed1b23e63410aa804d Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 19:24:30 +0530 Subject: [PATCH] revert: botched backport (backport #53967) (#53968) Co-authored-by: Mihir Kandoi fix(manufacturing): apply work order status filter in job card (#53776)" fix(manufacturing): apply work order status filter in job card (backport #53766) (#53767)" --- .../doctype/job_card/job_card.js | 36 +++++-------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.js b/erpnext/manufacturing/doctype/job_card/job_card.js index d911456f602..e096c73cc61 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.js +++ b/erpnext/manufacturing/doctype/job_card/job_card.js @@ -31,34 +31,6 @@ frappe.ui.form.on("Job Card", { }; }); - frm.set_query("operation", "time_logs", () => { - let operations = (frm.doc.sub_operations || []).map((d) => d.sub_operation); - return { - filters: { - name: ["in", operations], - }, - }; - }); - - frm.set_query("work_order", function () { - return { - filters: { - status: ["not in", ["Cancelled", "Closed", "Stopped"]], - }, - }; - }); - - frm.events.set_company_filters(frm, "target_warehouse"); - frm.events.set_company_filters(frm, "source_warehouse"); - frm.events.set_company_filters(frm, "wip_warehouse"); - frm.set_query("source_warehouse", "items", () => { - return { - filters: { - company: frm.doc.company, - }, - }; - }); - frm.set_indicator_formatter("sub_operation", function (doc) { if (doc.status == "Pending") { return "red"; @@ -75,6 +47,14 @@ frappe.ui.form.on("Job Card", { }, }; }); + + frm.set_query("work_order", function () { + return { + filters: { + status: ["not in", ["Cancelled", "Closed", "Stopped"]], + }, + }; + }); }, refresh: function (frm) {