blob: 8dba23e76b06faebe67fd6e2d666f37cd830d686 [file] [log] [blame]
Rushabh Mehta04cc5152013-11-18 13:22:07 +05301# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
2# License: GNU General Public License v3. See license.txt
3
4from home import update_feed
5from core.doctype.notification_count.notification_count import clear_doctype_notifications
6from stock.doctype.material_request.material_request import update_completed_qty
7
8def on_method(bean, method):
Rushabh Mehta04cc5152013-11-18 13:22:07 +05309 if method in ("on_update", "on_submit"):
10 update_feed(bean.controller, method)
11
12 if method in ("on_update", "on_cancel", "on_trash"):
13 clear_doctype_notifications(bean.controller, method)
14
15 if bean.doc.doctype=="Stock Entry" and method in ("on_submit", "on_cancel"):
16 update_completed_qty(bean.controller, method)