Merge pull request #3901 from rmehta/notify

[minor] notify stop/unstop (merge after merging realtime in frappe)
This commit is contained in:
Anand Doshi 2015-08-19 10:31:41 +05:30
commit df469c3e02
3 changed files with 4 additions and 0 deletions

View File

@ -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 = []

View File

@ -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):

View File

@ -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()