Commit dccbb3b8 authored by Aurel's avatar Aurel

rewrite script to not use deprecated code (thx to vincent)

also remove now useless related key (should have been part of former commit)
parent 6ffe8bde
......@@ -50,14 +50,17 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ZSQLCatalog.SQLCatalog import Query\n
portal = context.getPortalObject()\n
<value> <string>from Products.ZSQLCatalog.SQLCatalog import SimpleQuery\n
\n
reference_list = [x.reference for x in portal.portal_catalog(select_expression="catalog.reference", portal_type="Person", title=value, reference="%")]\n
portal = context.getPortalObject()\n
\n
query = Query(**{\'catalog.owner\': reference_list or -1})\n
reference_list = [x.reference for x in\n
portal.portal_catalog(SimpleQuery(reference=None,\n
comparison_operator="is not"),\n
select_list=[\'reference\'],\n
portal_type="Person", title=value)]\n
\n
return query\n
return SimpleQuery(owner=reference_list or -1)\n
</string> </value>
</item>
<item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
query_table</string> </value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z_related_owner_title</string> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
<dtml-var query_table>.owner = <dtml-var table_0>.reference\n
AND <dtml-var table_0>.portal_type = \'Person\'
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
1028
\ No newline at end of file
1030
\ 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