Commit 1ca4e620 authored by Aurel's avatar Aurel

allow user to quote original event when doing respond action

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18615 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 14a3a2ec
......@@ -66,7 +66,6 @@
<item>
<key> <string>_body</string> </key>
<value> <string># this script allows to create a new follow up ticket for a given event\n
\n
event_object = context\n
event_module = context.getPortalObject().getDefaultModule(\n
respond_event_portal_type)\n
......@@ -78,8 +77,11 @@ respond_event = event_module.newContent(\n
start_date=DateTime(),\n
source=context.getDefaultDestination(),\n
destination=context.getDefaultSource(),\n
causality=context.getRelativeUrl(),\n
causality=context.getRelativeUrl(), \n
)\n
\n
if respond_event_quotation:\n
respond_event.edit(text_content=context.getReplyBody())\n
# Change the state to outgoing\n
respond_event.plan()\n
</string> </value>
......@@ -104,7 +106,7 @@ respond_event.plan()\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>respond_event_portal_type, respond_event_title, respond_event_description=\'\'</string> </value>
<value> <string>respond_event_portal_type, respond_event_title, respond_event_quotation, respond_event_description=\'\'</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -124,7 +126,7 @@ respond_event.plan()\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>3</int> </value>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -132,6 +134,7 @@ respond_event.plan()\n
<tuple>
<string>respond_event_portal_type</string>
<string>respond_event_title</string>
<string>respond_event_quotation</string>
<string>respond_event_description</string>
<string>context</string>
<string>event_object</string>
......
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.Form</string>
<string>ERP5Form</string>
</tuple>
<none/>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -87,6 +84,7 @@
<string>your_respond_event_title</string>
<string>your_respond_event_description</string>
<string>your_workflow_action</string>
<string>your_respond_event_quotation</string>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="CheckBoxField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_respond_event_quotation</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Quote Event</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.DCWorkflow</string>
<string>DCWorkflowDefinition</string>
</tuple>
<none/>
<global name="DCWorkflowDefinition" module="Products.DCWorkflow.DCWorkflow"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -81,12 +78,14 @@ for history_item in history[::-1]:\n
respond_event_portal_type = history_item[\'respond_event_portal_type\']\n
respond_event_title = history_item[\'respond_event_title\']\n
respond_event_description = history_item[\'respond_event_description\']\n
respond_event_quotation = history_item[\'respond_event_quotation\']\n
break\n
\n
if respond_event_portal_type is not None:\n
event.Event_createRespondEvent(respond_event_portal_type,\n
respond_event_title,\n
respond_event_description)\n
respond_event_quotation,\n
respond_event_description,)\n
</string> </value>
</item>
<item>
......@@ -146,6 +145,7 @@ if respond_event_portal_type is not None:\n
<string>history_item</string>
<string>respond_event_title</string>
<string>respond_event_description</string>
<string>respond_event_quotation</string>
</tuple>
</value>
</item>
......
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.DCWorkflow.Transitions</string>
<string>TransitionDefinition</string>
</tuple>
<none/>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -101,17 +98,14 @@
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
......@@ -127,11 +121,17 @@
</value>
</item>
<item>
<key> <string>respond_event_title</string> </key>
<key> <string>respond_event_quotation</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAY=</string> </persistent>
</value>
</item>
<item>
<key> <string>respond_event_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAc=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
......@@ -177,6 +177,22 @@
</pickle>
</record>
<record id="6" aka="AAAAAAAAAAY=">
<pickle>
<tuple>
<global name="Expression" module="Products.CMFCore.Expression"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: state_change.kwargs.get(\'respond_event_quotation\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="7" aka="AAAAAAAAAAc=">
<pickle>
<tuple>
<tuple>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="VariableDefinition" module="Products.DCWorkflow.Variables"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_expr</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_value</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Store the boolean which tell if we quote original event or not</string> </value>
</item>
<item>
<key> <string>for_catalog</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>for_status</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>respond_event_quotation</string> </value>
</item>
<item>
<key> <string>info_guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
131
\ No newline at end of file
134
\ 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