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 @@
<item>
<key> <string>_body</string> </key>
<value> <string># this script allows to create a new follow up ticket for a given event\n
portal = context.getPortalObject()\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
# Create a new object\n
new_object = ticket_module.newContent(\n
portal_type=follow_up_ticket_type,\n
title=follow_up_ticket_title,\n
resource=follow_up_ticket_resource,\n
destination_decision_list=event.getSourceList()\n
)\n
\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>
</item>
<item>
<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>
<key> <string>id</string> </key>
......
559
\ No newline at end of file
560
\ 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