fix: disallow all actions on job card if work order is closed

This commit is contained in:
Mihir Kandoi
2026-03-04 16:05:24 +05:30
parent 700c14d5b3
commit ee19c32c3a

View File

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