diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml index db839892d3573183f41199385fda8da9b986b402..f2d7b08473e05af9b990c5b831e79567d1c36c43 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml @@ -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 @@ if from_url is None:\n \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 @@ context.setData(mail_message)\n \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 @@ if download:\n <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 @@ if download:\n <string>attachment_dict</string> <string>_getitem_</string> <string>str</string> + <string>transition_id</string> + <string>getattr</string> </tuple> </value> </item> diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision index a9ba1259cffcec623e16c1da4d1a05e47aad1015..6f4cec90d97e3a1765e48b3211c2c1ea1c46bb1d 100644 --- a/bt5/erp5_base/bt/revision +++ b/bt5/erp5_base/bt/revision @@ -1 +1 @@ -607 \ No newline at end of file +608 \ No newline at end of file diff --git a/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/transitions/acknowledge_event.xml b/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/transitions/acknowledge_event.xml index 6d8263b6d6791f82e1d634e30c7dfaa91c8b2f7b..a50f2e3af52fb9dd12c6f8f91e180eec2cc3e172 100644 --- a/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/transitions/acknowledge_event.xml +++ b/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/transitions/acknowledge_event.xml @@ -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> diff --git a/bt5/erp5_crm/bt/revision b/bt5/erp5_crm/bt/revision index f9945368e6a42bd79f66d17333a2c68a0d5f1e96..1e59c84a3a5150b77a9a325861bcd9cc79d709ea 100644 --- a/bt5/erp5_crm/bt/revision +++ b/bt5/erp5_crm/bt/revision @@ -1 +1 @@ -419 \ No newline at end of file +420 \ No newline at end of file