Added Notification Control for caching notifications probably causing the freezing problem

This commit is contained in:
Rushabh Mehta
2013-11-18 13:22:07 +05:30
parent 0809a95a70
commit 04cc5155f7
8 changed files with 31 additions and 15 deletions

17
startup/bean_handlers.py Normal file
View File

@@ -0,0 +1,17 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
from home import update_feed
from core.doctype.notification_count.notification_count import clear_doctype_notifications
from stock.doctype.material_request.material_request import update_completed_qty
def on_method(bean, method):
print method
if method in ("on_update", "on_submit"):
update_feed(bean.controller, method)
if method in ("on_update", "on_cancel", "on_trash"):
clear_doctype_notifications(bean.controller, method)
if bean.doc.doctype=="Stock Entry" and method in ("on_submit", "on_cancel"):
update_completed_qty(bean.controller, method)