Commit c60346e4 authored by Jérome Perrin's avatar Jérome Perrin

this use of query is not supported, make two catalog calls for now

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26200 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e9602bf7
...@@ -53,18 +53,21 @@ ...@@ -53,18 +53,21 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery\n <value> <string>sub_document_list = context.portal_catalog(\n
\n portal_type=portal_type,\n
# Get The documents in all storage structure. ie.: This scripts get all Files and Images\n relative_url=\'%s/%%\' % context.getRelativeUrl())\n
# distributed in many Project Lines in one Project.\n
query = ComplexQuery(\n
Query(relative_url=\'%s/%%\' % context.getRelativeUrl()),\n
Query(follow_up_uid=context.getUid()),\n
operator=\'OR\')\n
\n \n
return context.portal_catalog(\n follow_up_related_document_list = context.portal_catalog(\n
portal_type=portal_type,\n portal_type=portal_type,\n
query=query)\n follow_up_uid=context.getUid())\n
\n
if not sub_document_list:\n
return follow_up_related_document_list\n
\n
if not follow_up_related_document_list:\n
return sub_document_list\n
\n
return [doc for doc in follow_up_related_document_list] + [doc for doc in sub_document_list]\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -103,12 +106,14 @@ return context.portal_catalog(\n ...@@ -103,12 +106,14 @@ return context.portal_catalog(\n
<tuple> <tuple>
<string>portal_type</string> <string>portal_type</string>
<string>kw</string> <string>kw</string>
<string>Products.ZSQLCatalog.SQLCatalog</string>
<string>Query</string>
<string>ComplexQuery</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>query</string> <string>sub_document_list</string>
<string>follow_up_related_document_list</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>doc</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
1136 1137
\ No newline at end of file \ 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