Commit 46e86379 authored by Yoshinori Okuji's avatar Yoshinori Okuji

2008-06-11 yo

* Add a notification for finishing a task report.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21482 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5205efd9
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>task_report = state_change[\'object\']\n
\n
# Notify the requester.\n
source_person = task_report.getSourceValue(portal_type="Person")\n
destination_decision_person = task_report.getDestinationDecisionValue(portal_type="Person")\n
if destination_decision_person is None:\n
destination_decision_person = task_report.getDestinationValue(portal_type="Person")\n
if source_person is not None and destination_decision_person is not None:\n
message = """\n
%s has finished the task report titled with %s.\n
Please look at this URL:\n
%s/%s\n
""" % (source_person.getTitle(), task_report.getTitle(),\n
task_report.ERP5Site_getAbsoluteUrl(), task_report.getRelativeUrl())\n
portal = task_report.getPortalObject()\n
portal.portal_notifications.sendMessage(sender=source_person, recipient=destination_decision_person,\n
subject="Task Report Finished", message=message)\n
\n
container.PackingList_updateAppliedRule(state_change)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>state_change</string>
<string>_getitem_</string>
<string>task_report</string>
<string>_getattr_</string>
<string>source_person</string>
<string>destination_decision_person</string>
<string>None</string>
<string>message</string>
<string>portal</string>
<string>container</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>TaskReportWorkflow_notifyFinishedTaskReport</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -29,7 +29,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>PackingList_updateAppliedRule</string> </value>
<value> <string>TaskReportWorkflow_notifyFinishedTaskReport</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
2008-06-03
2008-06-11 yo
* Add a notification for finishing a task report.
2008-06-03 vincentd
* Add all rights for manager in :
project_workflow : Deleted, Open
task_report_causality_workflow : Building, Solving
......
518
\ No newline at end of file
523
\ 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