fix(manufacturing): close work order status when stock reservation is… (#53714)

* fix(manufacturing): close work order status when stock reservation is enabled

* chore: better syntax

---------

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
Pandiyan P
2026-03-23 21:35:00 +05:30
committed by GitHub
parent 96c79dfe8b
commit 8ebc2e38ec

View File

@@ -587,7 +587,7 @@ class WorkOrder(Document):
if self.docstatus == 0:
status = "Draft"
elif self.docstatus == 1:
if status != "Stopped":
if status not in ["Closed", "Stopped"]:
status = "Not Started"
if flt(self.material_transferred_for_manufacturing) > 0:
status = "In Process"