Commit f2c01f40 authored by Ivan Tyagov's avatar Ivan Tyagov

Minor change to query objects system. Add new query creation script.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14295 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1ab72850
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
A script which actually creates and returns the query object.\n
"""\n
\n
query_module = context.getPortalObject().query_module \n
query = query_module.newContent(description=description, \n
title=context.getPortalType(),\n
agent_value=context)\n
query.updateLocalRolesOnSecurityGroups()\n
query.post()\n
return query\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>description</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Assignor</string>
</tuple>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>description</string>
<string>_getattr_</string>
<string>context</string>
<string>query_module</string>
<string>query</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_newQuery</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -74,22 +74,13 @@ ptype = context.getPortalType()\n
\n
if not description:\n
return context.Base_redirect(dialog_id,\n
keep_items = dict(portal_status_message = translateString("Question can not be empty.",),\n
cancel_url = cancel_url))\n
keep_items = dict(portal_status_message = translateString("Question can not be empty.",), cancel_url = cancel_url))\n
\n
query_module = context.getPortalObject().query_module \n
query = query_module.newContent(description=description, title=context.getPortalType(),\n
agent_value=context)\n
query.updateLocalRolesOnSecurityGroups()\n
query = context.Base_newQuery(description=description)\n
query_id = query.getId()\n
query.post()\n
\n
return context.Base_redirect(form_id,\n
keep_items = dict(portal_status_message = translateString("A Query about the current ${portal_type} was posted with ID ${query_id}.", mapping = dict(query_id=query_id, portal_type=ptype)),\n
cancel_url = cancel_url))\n
\n
\n
return description\n
</string> </value>
</item>
<item>
......@@ -104,6 +95,12 @@ return description\n
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>dialog_id=None,form_id=None,description=None,cancel_url=\'\'</string> </value>
......@@ -150,7 +147,6 @@ return description\n
<string>request</string>
<string>ptype</string>
<string>dict</string>
<string>query_module</string>
<string>query</string>
<string>query_id</string>
</tuple>
......
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