From 5b2af6ad405c09fc77ae5f016741a764455bfdd5 Mon Sep 17 00:00:00 2001 From: Javier Wong Date: Mon, 25 Jul 2016 16:49:39 +0800 Subject: [PATCH] [Fixed] Stopping and Re-Opening of Production Order --- .../doctype/production_order/production_order.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py index cd24f9b5cc..2b173bf60f 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.py +++ b/erpnext/manufacturing/doctype/production_order/production_order.py @@ -112,8 +112,10 @@ class ProductionOrder(Document): 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)