[Erp5-report] r27904 - in /erp5/trunk/bt5: erp5_base/SkinTemplateItem/portal_skins/erp5_bas...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Jul 3 13:54:55 CEST 2009


Author: jm
Date: Fri Jul  3 13:54:54 2009
New Revision: 27904

URL: http://svn.erp5.org?rev=27904&view=rev
Log:
* Event_send: Plan, order or start event if possible.
* Fix r27894 (acknowledge -> acknowledge_event).

Modified:
    erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml
    erp5/trunk/bt5/erp5_base/bt/revision
    erp5/trunk/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/transitions/acknowledge_event.xml
    erp5/trunk/bt5/erp5_crm/bt/revision

Modified: erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml?rev=27904&r1=27903&r2=27904&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml [utf8] Fri Jul  3 13:54:54 2009
@@ -55,6 +55,8 @@
             <key> <string>_body</string> </key>
             <value> <string encoding="cdata"><![CDATA[
 
+portal = context.getPortalObject()\n
+\n
 if body is None:\n
   body = context.getTextContent() #XXX This does not support structured text format.\n
 \n
@@ -73,7 +75,7 @@
 \n
 # Return-Path\n
 if reply_url is None:\n
-  reply_url = context.portal_preferences.getPreferredEventSenderEmail()\n
+  reply_url = portal.portal_preferences.getPreferredEventSenderEmail()\n
 additional_headers = None\n
 if reply_url:\n
   additional_headers = {\'Return-Path\':reply_url}\n
@@ -133,9 +135,9 @@
 \n
 # Transit event workflow\n
 if context.getTypeInfo() is not None:\n
-  context.plan()\n
-  context.order()\n
-  context.start()\n
+  for transition_id in \'plan\', \'order\', \'start\':\n
+    if portal.portal_workflow.isTransitionPossible(context, transition_id):\n
+      getattr(context, transition_id)()\n
 \n
 if download:\n
   return mail_message\n
@@ -194,9 +196,10 @@
                             <string>attachment_list</string>
                             <string>download</string>
                             <string>kw</string>
-                            <string>None</string>
                             <string>_getattr_</string>
                             <string>context</string>
+                            <string>portal</string>
+                            <string>None</string>
                             <string>sender</string>
                             <string>additional_headers</string>
                             <string>to_url_list</string>
@@ -221,6 +224,8 @@
                             <string>attachment_dict</string>
                             <string>_getitem_</string>
                             <string>str</string>
+                            <string>transition_id</string>
+                            <string>getattr</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_base/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/bt/revision?rev=27904&r1=27903&r2=27904&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/bt/revision [utf8] Fri Jul  3 13:54:54 2009
@@ -1,1 +1,1 @@
-607
+608

Modified: erp5/trunk/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/transitions/acknowledge_event.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/transitions/acknowledge_event.xml?rev=27904&r1=27903&r2=27904&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/transitions/acknowledge_event.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/transitions/acknowledge_event.xml [utf8] Fri Jul  3 13:54:54 2009
@@ -37,7 +37,7 @@
         </item>
         <item>
             <key> <string>id</string> </key>
-            <value> <string>acknowledge</string> </value>
+            <value> <string>acknowledge_event</string> </value>
         </item>
         <item>
             <key> <string>new_state_id</string> </key>

Modified: erp5/trunk/bt5/erp5_crm/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_crm/bt/revision?rev=27904&r1=27903&r2=27904&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_crm/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_crm/bt/revision [utf8] Fri Jul  3 13:54:54 2009
@@ -1,1 +1,1 @@
-419
+420




More information about the Erp5-report mailing list