From e6d808820ae72f84e3b2d3be8527dcd4b2c235c7 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 24 Apr 2012 11:06:48 +0530 Subject: [PATCH] Error fixed in notification control --- .../doctype/notification_control/notification_control.js | 8 ++++---- .../doctype/notification_control/notification_control.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/setup/doctype/notification_control/notification_control.js b/erpnext/setup/doctype/notification_control/notification_control.js index 32919b6f9c..551269789e 100644 --- a/erpnext/setup/doctype/notification_control/notification_control.js +++ b/erpnext/setup/doctype/notification_control/notification_control.js @@ -14,19 +14,19 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -cur_frm.cscript.select_transaction = function(doc, dt, dn) { +cur_frm.cscript.select_transaction = function(doc, cdt, cdn) { if(doc.select_transaction) { var callback = function(r,rt) { - var doc = locals[dt][dn]; + var doc = locals[cdt][cdn]; doc.custom_message = r.message; refresh_field('custom_message'); } - $c_obj('Notification Control','get_message',doc.select_transaction, callback) + $c_obj(make_doclist(cdt, cdn),'get_message',doc.select_transaction, callback) } } cur_frm.cscript.notify = function(doc, args) { - $c_obj('Notification Control', 'get_formatted_message', { + $c_obj(make_doclist(doc.doctype, doc.name), 'get_formatted_message', { type: args['type'], doctype: args['doctype'], contact_name: args['contact_name'] || doc.contact_display diff --git a/erpnext/setup/doctype/notification_control/notification_control.py b/erpnext/setup/doctype/notification_control/notification_control.py index 9dc0076598..61f558765f 100644 --- a/erpnext/setup/doctype/notification_control/notification_control.py +++ b/erpnext/setup/doctype/notification_control/notification_control.py @@ -39,7 +39,7 @@ class DocType: # set custom text # --------------- - def set_message(self, arg=''): + def set_message(self, arg = ''): fn = self.doc.select_transaction.lower().replace(' ', '_') + '_message' webnotes.conn.set(self.doc, fn, self.doc.custom_message) msgprint("Custom Message for %s updated!" % self.doc.select_transaction)