Merge pull request #53164 from frappe/mergify/bp/version-15-hotfix/pr-53157

fix: disallow all actions on job card if work order is closed (backport #53157)
This commit is contained in:
Mihir Kandoi
2026-03-04 17:09:17 +05:30
committed by GitHub

View File

@@ -1076,9 +1076,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