Commit 2db7631c authored by Vincent Pelletier's avatar Vincent Pelletier

Add quick_search_text scriptable key (moved from erp5_dms_mysql_innodb_catalog).

Update this script to adapt to the form of SearchText input by user.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26804 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 37c36ab8
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>from Products.ZSQLCatalog.SQLCatalog import Query\n
from Products.ZSQLCatalog.SQLCatalog import ComplexQuery\n
\n
if container.isAdvancedSearchText(value):\n
# the text which was provided is not a simple value\n
# and contains predicates such as portal_type:\n
query = Query(SearchableText=value)\n
else:\n
query = ComplexQuery(Query(title=value),\n
Query(reference=value),\n
Query(source_reference=value),\n
Query(destination_reference=value),\n
Query(SearchableText=value),\n
operator="OR")\n
return query\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>value</string> </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>value</string>
<string>Products.ZSQLCatalog.SQLCatalog</string>
<string>Query</string>
<string>ComplexQuery</string>
<string>_getattr_</string>
<string>container</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>SQLCatalog_makeQuickSearchQuery</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<key_list>
<key>quick_search_text | SQLCatalog_makeQuickSearchQuery</key>
</key_list>
\ No newline at end of file
137
\ No newline at end of file
138
\ No newline at end of file
erp5_mysql_innodb/SQLCatalog_makeQuickSearchQuery
erp5_mysql_innodb/z0_drop_alarm
erp5_mysql_innodb/z0_drop_catalog
erp5_mysql_innodb/z0_drop_category
......
quick_search_text | SQLCatalog_makeQuickSearchQuery
\ 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