reorder level fixes
This commit is contained in:
parent
03d957027c
commit
39cfc5865e
@ -355,12 +355,12 @@ class DocType:
|
|||||||
""" Notify user about auto creation of indent"""
|
""" Notify user about auto creation of indent"""
|
||||||
|
|
||||||
from webnotes.utils.email_lib import sendmail
|
from webnotes.utils.email_lib import sendmail
|
||||||
email_list=[d[0] for d in sql("""select parent from tabUserRole
|
email_list=[d[0] for d in sql("""select distinct r.parent from tabUserRole r, tabProfile p
|
||||||
where role in ('Purchase Manager','Material Manager')
|
where p.name = r.parent and p.enabled = 1 and p.docstatus < 2
|
||||||
and parent not in ('Administrator', 'All', 'Guest')""")]
|
and r.role in ('Purchase Manager','Material Manager')
|
||||||
|
and p.name not in ('Administrator', 'All', 'Guest')""")]
|
||||||
msg="""A Purchase Request has been raised
|
msg="""A Purchase Request has been raised
|
||||||
for item %s: %s on %s """ % (doc_type, doc_name, nowdate())
|
for item %s: %s on %s """ % (doc_type, doc_name, nowdate())
|
||||||
|
|
||||||
sendmail(email_list, subject='Auto Purchase Request Generation Notification', msg = msg)
|
sendmail(email_list, subject='Auto Purchase Request Generation Notification', msg = msg)
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user