[Erp5-report] r18137 - in /erp5/trunk/bt5/erp5_crm: WorkflowTemplateItem/portal_workflow/sa...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Dec 7 18:01:12 CET 2007


Author: jerome
Date: Fri Dec  7 18:01:12 2007
New Revision: 18137

URL: http://svn.erp5.org?rev=18137&view=rev
Log:
stop accessing "context" in workflow script.

Modified:
    erp5/trunk/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/sale_opportunity_workflow/scripts/mail_message.xml
    erp5/trunk/bt5/erp5_crm/bt/revision

Modified: erp5/trunk/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/sale_opportunity_workflow/scripts/mail_message.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/sale_opportunity_workflow/scripts/mail_message.xml?rev=18137&r1=18136&r2=18137&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/sale_opportunity_workflow/scripts/mail_message.xml (original)
+++ erp5/trunk/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/sale_opportunity_workflow/scripts/mail_message.xml Fri Dec  7 18:01:12 2007
@@ -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 @@
                             <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>

Modified: erp5/trunk/bt5/erp5_crm/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_crm/bt/revision?rev=18137&r1=18136&r2=18137&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_crm/bt/revision (original)
+++ erp5/trunk/bt5/erp5_crm/bt/revision Fri Dec  7 18:01:12 2007
@@ -1,1 +1,1 @@
-127
+128




More information about the Erp5-report mailing list