cleanup of notification control: now in boot

This commit is contained in:
Rushabh Mehta
2012-11-30 10:57:28 +05:30
parent e1e4aafd9b
commit 35c017a78f
23 changed files with 128 additions and 295 deletions

View File

@@ -238,10 +238,12 @@ class TransactionBase:
return dcc
def get_formatted_message(self, args):
""" get formatted message for auto notification"""
return get_obj('Notification Control').get_formatted_message(args)
def load_notification_message(self):
dt = self.doc.doctype.lower().replace(" ", "_")
if int(webnotes.conn.get_value("Notification Control", None, dt) or 0):
self.doc.fields["__notification_message"] = \
webnotes.conn.get_value("Notification Control", None, dt + "_message")
def add_communication_list(self):
# remove communications if present
self.doclist = webnotes.doclist(self.doclist).get({