Commit 3742a4c8 authored by Aurel's avatar Aurel

implement scriptable key to search by owner title thus improving a lot performances

parent 6e6dbb01
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</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
portal = context.getPortalObject()\n
\n
reference_list = [x.reference for x in portal.portal_catalog(select_expression="catalog.reference", portal_type="Person", title=value, reference="%")]\n
\n
query = Query(**{\'catalog.owner\': reference_list or -1})\n
\n
return query\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>value</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SQLCatalog_makeOwnerTitleSearchQuery</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -3,7 +3,6 @@
<key>child_telephone_SearchableText | catalog,full_text/SearchableText/z_related_child_telephone</key>
<key>default_email_text | catalog,email/url_string/z_related_default_email</key>
<key>destination_person_title | category,catalog/title/z_related_destination_person</key>
<key>owner_title | catalog/title/z_related_owner_title</key>
<key>related_resource_use_uid | category,category,catalog,catalog/uid/z_related_resource_use</key>
<key>source_organisation_title | category,catalog/title/z_related_source_organisation</key>
<key>source_person_title | category,catalog/title/z_related_source_person</key>
......
<key_list>
<key>owner_title | SQLCatalog_makeOwnerTitleSearchQuery</key>
</key_list>
\ No newline at end of file
1026
\ No newline at end of file
1028
\ No newline at end of file
erp5_mysql_innodb/SQLCatalog_makeOwnerTitleSearchQuery
erp5_mysql_innodb/z_related_child_address
erp5_mysql_innodb/z_related_child_telephone
erp5_mysql_innodb/z_related_default_email
erp5_mysql_innodb/z_related_destination_person
erp5_mysql_innodb/z_related_owner_title
erp5_mysql_innodb/z_related_resource_use
erp5_mysql_innodb/z_related_source_organisation
erp5_mysql_innodb/z_related_source_person
\ No newline at end of file
......@@ -3,6 +3,5 @@ source_person_title | category,catalog/title/z_related_source_person
destination_person_title | category,catalog/title/z_related_destination_person
default_email_text | catalog,email/url_string/z_related_default_email
related_resource_use_uid | category,category,catalog,catalog/uid/z_related_resource_use
owner_title | catalog/title/z_related_owner_title
child_address_SearchableText | catalog,full_text/SearchableText/z_related_child_address
child_telephone_SearchableText | catalog,full_text/SearchableText/z_related_child_telephone
\ No newline at end of file
owner_title | SQLCatalog_makeOwnerTitleSearchQuery
\ 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