Fixed issie in auto notification
This commit is contained in:
parent
28b9551acf
commit
41cc32790f
@ -248,7 +248,8 @@ $import(Notification Control)
|
||||
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
|
||||
var args = {
|
||||
type: 'Expense Voucher',
|
||||
doctype: 'Expense Voucher'
|
||||
doctype: 'Expense Voucher',
|
||||
send_to: doc.exp_approver
|
||||
}
|
||||
cur_frm.cscript.notify(doc, args);
|
||||
}
|
||||
|
@ -98,8 +98,6 @@ class DocType:
|
||||
set(self.doc, 'remark', self.doc.remark)
|
||||
set(self.doc, 'approval_status', 'Rejected')
|
||||
|
||||
# on approval notification
|
||||
#get_obj('Notification Control').notify_contact('Expense Voucher Rejected', self.doc.doctype, self.doc.name, self.doc.email_id, self.doc.employee_name)
|
||||
|
||||
return cstr('Rejected')
|
||||
|
||||
@ -157,3 +155,8 @@ class DocType:
|
||||
|
||||
def on_cancel(self):
|
||||
set(self.doc, 'approval_status', 'Cancelled')
|
||||
|
||||
|
||||
def get_formatted_message(self, args):
|
||||
""" get formatted message for auto notification"""
|
||||
return get_obj('Notification Control').get_formatted_message(args)
|
||||
|
@ -90,7 +90,8 @@ class DocType(TransactionBase):
|
||||
# -------------------------------------
|
||||
def get_comm_rate(self, sales_partner):
|
||||
return get_obj('Sales Common').get_comm_rate(sales_partner, self)
|
||||
|
||||
|
||||
|
||||
# Clear Sales Order Details Table
|
||||
# --------------------------------
|
||||
def clear_sales_order_details(self):
|
||||
|
@ -23,7 +23,7 @@ from webnotes.model.code import get_obj
|
||||
from webnotes import msgprint
|
||||
|
||||
sql = webnotes.conn.sql
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------------------
|
||||
# Notification control
|
||||
class DocType:
|
||||
|
@ -18,6 +18,7 @@ import webnotes
|
||||
from webnotes.utils import load_json, cint, cstr, flt, get_defaults
|
||||
from webnotes.model.doc import Document, addchild, removechild, getchildren
|
||||
from webnotes.model.doclist import getlist, copy_doclist
|
||||
from webnotes.model.code import get_obj
|
||||
from webnotes import msgprint
|
||||
|
||||
class TransactionBase:
|
||||
@ -225,3 +226,8 @@ class TransactionBase:
|
||||
ret = webnotes.conn.sql("select default_currency from tabCompany where name = '%s'" %(name))
|
||||
dcc = ret and ret[0][0] or get_defaults()['currency']
|
||||
return dcc
|
||||
|
||||
|
||||
def get_formatted_message(self, args):
|
||||
""" get formatted message for auto notification"""
|
||||
return get_obj('Notification Control').get_formatted_message(args)
|
||||
|
Loading…
x
Reference in New Issue
Block a user