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

(cherry picked from commit ee19c32c3a)
This commit is contained in:
Mihir Kandoi
2026-03-04 16:05:24 +05:30
committed by Mergify
parent d5a250a254
commit 7b2e4832aa

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