Commit 52e6e9a3 authored by Nicolas Delaby's avatar Nicolas Delaby

Allows to pass resource and extend follow_up_list instead of replace it

parent 49d9bff7
...@@ -51,23 +51,27 @@ ...@@ -51,23 +51,27 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># this script allows to create a new follow up ticket for a given event\n <value> <string># this script allows to create a new follow up ticket for a given event\n
portal = context.getPortalObject()\n
event = context\n event = context\n
ticket_module = event.getPortalObject().getDefaultModule(follow_up_ticket_type)\n ticket_module = portal.getPortalObject().getDefaultModule(follow_up_ticket_type)\n
\n \n
# Create a new object\n # Create a new object\n
new_object = ticket_module.newContent(\n new_object = ticket_module.newContent(\n
portal_type=follow_up_ticket_type,\n portal_type=follow_up_ticket_type,\n
title=follow_up_ticket_title,\n title=follow_up_ticket_title,\n
resource=follow_up_ticket_resource,\n
destination_decision_list=event.getSourceList()\n destination_decision_list=event.getSourceList()\n
)\n )\n
\n \n
# Now create the relation between the event object and the new follow up ticket\n # Now create the relation between the event object and the new follow up ticket\n
event.setFollowUpValueList([new_object])\n follow_up_list = event.getFollowUpList()\n
follow_up_list.append(new_object.getRelativeUrl())\n
event.setFollowUpValueList(follow_up_list)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>follow_up_ticket_title="Sale Opportunity", follow_up_ticket_type=None</string> </value> <value> <string>follow_up_ticket_title="Sale Opportunity", follow_up_ticket_type=None, follow_up_ticket_resource=None, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
559 560
\ 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