Commit acab0997 authored by Romain Courteaud's avatar Romain Courteaud

Improve the notification sent by the Task Report.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10596 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7f253e94
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context = state_change.object\n
<value> <string>packing_list = state_change.object\n
\n
# Notify assignee\n
source_person = context.getSourceValue(portal_type="Person")\n
......@@ -80,17 +80,26 @@ if source_person is not None:\n
email = source_person.getDefaultEmailValue()\n
if email is not None:\n
msg = """\n
A task has been assigned to you by %(assignor)s who would like to know how your task is progressing.\n
A new task has been assigned to you by %(assignor)s.\n
\n
This task is named: %(title)s\n
\n
Description: \n
%(comment)s\n
\n
Start Date: %(start_date)%\n
Stop Date: %(stop_date)%\n
\n
Please wisit ERP5: %(url)s\n
""" % {\n
\'assignor\': destination_decision_person.getTitle(), \n
\'title\' : context.getTitle(),\n
\'url\' : context.absolute_url(),\n
\'assignor\': destination_decision_person.getTitle(),\n
\'title\' : packing_list.getTitle(),\n
\'url\' : packing_list.absolute_url(),\n
\'comment\' : packing_list.getComment(),\n
\'start_date\': packing_list.getStartDate().Date(),\n
\'stop_date\': packing_list.getStopDate().Date(),\n
}\n
email.activate().send(from_url = from_email, subject="Task Progress Query", msg = msg)\n
email.activate().send(from_url = from_email, subject="New Task Assigned to You", msg = msg)\n
</string> </value>
</item>
<item>
......@@ -135,6 +144,7 @@ Please wisit ERP5: %(url)s\n
<tuple>
<string>state_change</string>
<string>_getattr_</string>
<string>packing_list</string>
<string>context</string>
<string>source_person</string>
<string>destination_decision_person</string>
......
94
\ No newline at end of file
96
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment