Commit d0c912b3 authored by Jérome Perrin's avatar Jérome Perrin

stop accessing "context" in workflow script.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18137 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 757de78d
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -70,11 +67,12 @@
<key> <string>_body</string> </key>
<value> <string>string_subject = \'Re: %s\' % state_change[\'object\'].getTitle()\n
message = state_change.kwargs[\'comment\']\n
document = state_change[\'object\']\n
\n
# XXX Wrong way to get email or even to send an email\n
PersonModule_viewPersonList = context.getClientValueList(portal_type="Person") # should become getDestinationSectionList()\n
PersonModule_viewPersonList = document.getClientValueList(portal_type="Person") # should become getDestinationSectionList()\n
email_list = map(lambda x:x.getDefaultEmailText(), PersonModule_viewPersonList)\n
state_change[\'object\'].MailHost.send(message, mto=email_list, mfrom=context.portal_preferences.getPreferredEventSenderEmail(),\n
document.MailHost.send(message, mto=email_list, mfrom=context.portal_preferences.getPreferredEventSenderEmail(),\n
subject=string_subject)\n
</string> </value>
</item>
......@@ -123,10 +121,11 @@ state_change[\'object\'].MailHost.send(message, mto=email_list, mfrom=context.po
<string>_getitem_</string>
<string>string_subject</string>
<string>message</string>
<string>context</string>
<string>document</string>
<string>PersonModule_viewPersonList</string>
<string>map</string>
<string>email_list</string>
<string>context</string>
</tuple>
</value>
</item>
......
127
\ No newline at end of file
128
\ 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