Merge pull request #5858 from bohlian/develop
[Fixed] Stopping and Re-Opening of Production Order
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py
index cd24f9b..2b173bf 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.py
+++ b/erpnext/manufacturing/doctype/production_order/production_order.py
@@ -112,8 +112,10 @@
def update_status(self, status=None):
- '''Update status of production order'''
- status = self.get_status()
+ '''Update status of production order if unknown'''
+ if not status:
+ status = self.get_status()
+
if status != self.status:
self.db_set("status", status)