mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-23 05:04:52 +01:00
fix: disallow all actions on job card if work order is closed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user