email message fix for task
This commit is contained in:
parent
0de918204d
commit
0cfecf2920
@ -127,7 +127,7 @@ def sent_reminder_task():
|
|||||||
and exp_start_date is not null""",as_dict=1)
|
and exp_start_date is not null""",as_dict=1)
|
||||||
for i in task_list:
|
for i in task_list:
|
||||||
if date_diff(i['exp_start_date'],nowdate()) ==2:
|
if date_diff(i['exp_start_date'],nowdate()) ==2:
|
||||||
msg2="""<h2>Two days to complete: %(name)s<h2>
|
msg2="""<h2>Two days to complete: %(name)s</h2>
|
||||||
<p>This is a reminder for the task %(name)s has been assigned to you
|
<p>This is a reminder for the task %(name)s has been assigned to you
|
||||||
by %(senders_name)s on %(opening_date)s</p>
|
by %(senders_name)s on %(opening_date)s</p>
|
||||||
<p><b>Project:</b> %(project)s</p>
|
<p><b>Project:</b> %(project)s</p>
|
||||||
|
@ -72,9 +72,9 @@ class DocType:
|
|||||||
def on_update(self):
|
def on_update(self):
|
||||||
if self.doc.status =='Open' and self.doc.allocated_to:
|
if self.doc.status =='Open' and self.doc.allocated_to:
|
||||||
if self.doc.task_email_notify and (self.doc.allocated_to != self.doc.allocated_to_old):
|
if self.doc.task_email_notify and (self.doc.allocated_to != self.doc.allocated_to_old):
|
||||||
|
self.doc.sent_reminder = 0
|
||||||
self.doc.allocated_to_old = self.doc.allocated_to
|
self.doc.allocated_to_old = self.doc.allocated_to
|
||||||
self.sent_notification()
|
self.sent_notification()
|
||||||
self.doc.sent_reminder = 0
|
|
||||||
if self.doc.exp_start_date:
|
if self.doc.exp_start_date:
|
||||||
sql("delete from tabEvent where ref_type='Task' and ref_name=%s", self.doc.name)
|
sql("delete from tabEvent where ref_type='Task' and ref_name=%s", self.doc.name)
|
||||||
self.add_calendar_event()
|
self.add_calendar_event()
|
||||||
@ -91,10 +91,15 @@ class DocType:
|
|||||||
|
|
||||||
#Sent Notification
|
#Sent Notification
|
||||||
def sent_notification(self):
|
def sent_notification(self):
|
||||||
msg2="""This is an auto generated email.<br/>A task %s has been assigned to you by %s on %s<br/><br/>\
|
msg2="""<h2>%(name)s</h2>
|
||||||
Project: %s <br/><br/>Review Date: %s<br/><br/>Closing Date: %s <br/><br/>Details: %s <br/><br/>""" \
|
<p>This is a Notification for the task %(name)s that has been assigned to you
|
||||||
%(self.doc.name, self.doc.senders_name, self.doc.opening_date, \
|
by %(senders_name)s on %(opening_date)s</p>
|
||||||
self.doc.project, self.doc.review_date, self.doc.closing_date, self.doc.description)
|
<p><b>Project:</b> %(project)s</p>
|
||||||
|
<p><b>Review Date:</b> %(review_date)s</p>
|
||||||
|
<p><b>Details:</b> %(description)s</p>
|
||||||
|
<p><b>You will also recieve another reminder 2 days before the commencement of the task</b></p>
|
||||||
|
<p>Good Luck!</p>
|
||||||
|
<p>(This notification is autogenerated)</p>""" % i
|
||||||
sendmail(self.doc.allocated_to, sender='automail@webnotestech.com', msg=msg2,send_now=1,\
|
sendmail(self.doc.allocated_to, sender='automail@webnotestech.com', msg=msg2,send_now=1,\
|
||||||
subject='A task has been assigned')
|
subject='A task has been assigned')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user