From 57aab56baa53be732c063e0c259693ad500ab41c Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 4 Mar 2026 16:05:24 +0530 Subject: [PATCH] fix: disallow all actions on job card if work order is closed (cherry picked from commit ee19c32c3aa0c4b5fa1ec44b2af46b651a80a853) --- erpnext/manufacturing/doctype/job_card/job_card.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 46209c88117..d283bc8dadb 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -1321,9 +1321,9 @@ class JobCard(Document): def is_work_order_closed(self): if self.work_order: - status = frappe.get_value("Work Order", self.work_order) + status = frappe.get_value("Work Order", self.work_order, "status") - if status == "Closed": + if status in ["Closed", "Stopped"]: return True return False