[Erp5-report] r26200 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Mar 31 10:17:30 CEST 2009
Author: jerome
Date: Tue Mar 31 10:17:24 2009
New Revision: 26200
URL: http://svn.erp5.org?rev=26200&view=rev
Log:
this use of query is not supported, make two catalog calls for now
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedDocumentList.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedDocumentList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedDocumentList.xml?rev=26200&r1=26199&r2=26200&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedDocumentList.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedDocumentList.xml [utf8] Tue Mar 31 10:17:24 2009
@@ -53,18 +53,21 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string>from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery\n
+ <value> <string>sub_document_list = context.portal_catalog(\n
+ portal_type=portal_type,\n
+ relative_url=\'%s/%%\' % context.getRelativeUrl())\n
\n
-# Get The documents in all storage structure. ie.: This scripts get all Files and Images\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
+follow_up_related_document_list = context.portal_catalog(\n
+ portal_type=portal_type,\n
+ follow_up_uid=context.getUid())\n
\n
-return context.portal_catalog(\n
- portal_type=portal_type,\n
- query=query)\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>
</item>
<item>
@@ -103,12 +106,14 @@
<tuple>
<string>portal_type</string>
<string>kw</string>
- <string>Products.ZSQLCatalog.SQLCatalog</string>
- <string>Query</string>
- <string>ComplexQuery</string>
<string>_getattr_</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>
</value>
</item>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=26200&r1=26199&r2=26200&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Tue Mar 31 10:17:24 2009
@@ -1,1 +1,1 @@
-1136
+1137
More information about the Erp5-report
mailing list