Error fixed in notification control
This commit is contained in:
parent
4c9525139d
commit
e6d808820a
@ -14,19 +14,19 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user