Commit 190468a5 authored by Julien Muchembled's avatar Julien Muchembled

* Event_send: Plan, order or start event if possible.

* Fix r27894 (acknowledge -> acknowledge_event).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27904 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ca39abc2
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
portal = context.getPortalObject()\n
\n
if body is None:\n if body is None:\n
body = context.getTextContent() #XXX This does not support structured text format.\n body = context.getTextContent() #XXX This does not support structured text format.\n
\n \n
...@@ -73,7 +75,7 @@ if from_url is None:\n ...@@ -73,7 +75,7 @@ if from_url is None:\n
\n \n
# Return-Path\n # Return-Path\n
if reply_url is None:\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 additional_headers = None\n
if reply_url:\n if reply_url:\n
additional_headers = {\'Return-Path\':reply_url}\n additional_headers = {\'Return-Path\':reply_url}\n
...@@ -133,9 +135,9 @@ context.setData(mail_message)\n ...@@ -133,9 +135,9 @@ context.setData(mail_message)\n
\n \n
# Transit event workflow\n # Transit event workflow\n
if context.getTypeInfo() is not None:\n if context.getTypeInfo() is not None:\n
context.plan()\n for transition_id in \'plan\', \'order\', \'start\':\n
context.order()\n if portal.portal_workflow.isTransitionPossible(context, transition_id):\n
context.start()\n getattr(context, transition_id)()\n
\n \n
if download:\n if download:\n
return mail_message\n return mail_message\n
...@@ -194,9 +196,10 @@ if download:\n ...@@ -194,9 +196,10 @@ if download:\n
<string>attachment_list</string> <string>attachment_list</string>
<string>download</string> <string>download</string>
<string>kw</string> <string>kw</string>
<string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string>
<string>None</string>
<string>sender</string> <string>sender</string>
<string>additional_headers</string> <string>additional_headers</string>
<string>to_url_list</string> <string>to_url_list</string>
...@@ -221,6 +224,8 @@ if download:\n ...@@ -221,6 +224,8 @@ if download:\n
<string>attachment_dict</string> <string>attachment_dict</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>str</string> <string>str</string>
<string>transition_id</string>
<string>getattr</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
607 608
\ No newline at end of file \ No newline at end of file
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>acknowledge</string> </value> <value> <string>acknowledge_event</string> </value>
</item> </item>
<item> <item>
<key> <string>new_state_id</string> </key> <key> <string>new_state_id</string> </key>
......
419 420
\ No newline at end of file \ 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