From 1d1f1b06d96661118b935e0003d673aa8ede2a3f Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 18 Aug 2015 17:26:50 +0530 Subject: [PATCH] [minor] notify stop/unstop --- erpnext/buying/doctype/purchase_order/purchase_order.py | 2 ++ .../manufacturing/doctype/production_order/production_order.py | 1 + erpnext/selling/doctype/sales_order/sales_order.py | 1 + 3 files changed, 4 insertions(+) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 6756e47d0e..9887ddb416 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -248,6 +248,8 @@ def stop_or_unstop_purchase_orders(names, status): if po.status == "Stopped": po.update_status("Submitted") + po.notify_modified() + frappe.local.message_log = [] diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py index b6befe0867..6a6e6ed8d2 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.py +++ b/erpnext/manufacturing/doctype/production_order/production_order.py @@ -107,6 +107,7 @@ class ProductionOrder(Document): qty = (flt(self.qty)-flt(self.produced_qty)) * ((status == 'Stopped') and -1 or 1) self.update_planned_qty(qty) frappe.msgprint(_("Production Order status is {0}").format(status)) + self.notify_modified() def update_status(self, status=None): diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 1c05715179..b05c009fa0 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -216,6 +216,7 @@ class SalesOrder(SellingController): self.update_stock_ledger(-1) frappe.db.set(self, 'status', 'Stopped') frappe.msgprint(_("{0} {1} status is Stopped").format(self.doctype, self.name)) + self.notify_modified() def unstop_sales_order(self): self.check_modified_date()