From 5ee5efac0ac59279685eca4a17a30965ccfd090a Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Fri, 14 Aug 2009 09:07:11 +0000
Subject: [PATCH] the argument name for sort in portal_catalog is not
 'order_by' but 'sort_on'.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28377 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../NotificationTool_getDocumentValue.xml        |  6 +++---
 bt5/erp5_base/bt/revision                        |  2 +-
 .../erp5_egov/WebSection_getDocumentValue.xml    | 16 ++++++++--------
 bt5/erp5_egov/bt/revision                        |  2 +-
 .../erp5_web/WebSection_getDocumentValue.xml     |  6 +++---
 bt5/erp5_web/bt/revision                         |  2 +-
 product/ERP5/Document/Document.py                |  2 +-
 7 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/NotificationTool_getDocumentValue.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/NotificationTool_getDocumentValue.xml
index 2e3b93335c..5dc2b717c0 100644
--- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/NotificationTool_getDocumentValue.xml
+++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/NotificationTool_getDocumentValue.xml
@@ -81,7 +81,7 @@ notification_message_list = portal_catalog(reference=reference,\n
                                            portal_type=valid_portal_type_list,\n
                                            validation_state=validation_state,\n
                                            language=language,\n
-                                           order_by=[(\'version\', \'descending\')],\n
+                                           sort_on=[(\'version\', \'descending\')],\n
                                            group_by=(\'reference\',),\n
                                            **kw)\n
 \n
@@ -91,7 +91,7 @@ if len(notification_message_list) == 0 and language != \'en\':\n
                                              portal_type=valid_portal_type_list,\n
                                              validation_state=validation_state,\n
                                              language=\'en\',\n
-                                             order_by=[(\'version\', \'descending\')],\n
+                                             sort_on=[(\'version\', \'descending\')],\n
                                              group_by=(\'reference\',),\n
                                              **kw)\n
 \n
@@ -100,7 +100,7 @@ if len(notification_message_list) == 0:\n
   notification_message_list = portal_catalog(reference=reference,\n
                                              portal_type=valid_portal_type_list,\n
                                              validation_state=validation_state,\n
-                                             order_by=[(\'version\', \'descending\')],\n
+                                             sort_on=[(\'version\', \'descending\')],\n
                                              group_by=(\'reference\',),\n
                                              **kw)\n
 \n
diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision
index e0c903f474..53a274896e 100644
--- a/bt5/erp5_base/bt/revision
+++ b/bt5/erp5_base/bt/revision
@@ -1 +1 @@
-625
\ No newline at end of file
+626
\ No newline at end of file
diff --git a/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/WebSection_getDocumentValue.xml b/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/WebSection_getDocumentValue.xml
index bf4cd1d82b..f4f903d659 100644
--- a/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/WebSection_getDocumentValue.xml
+++ b/bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov/WebSection_getDocumentValue.xml
@@ -94,7 +94,7 @@ web_page_list = portal_catalog(reference=name,\n
                                portal_type=valid_portal_type_list,\n
                                validation_state=validation_state,\n
                                language=language,\n
-                               order_by=[(\'version\', \'descending\')],\n
+                               sort_on=[(\'version\', \'descending\')],\n
                                group_by=(\'reference\',),\n
                                limit=1,\n
                                **kw)\n
@@ -105,7 +105,7 @@ if len(web_page_list) == 0 and language != \'en\':\n
                                  portal_type=valid_portal_type_list,\n
                                  validation_state=validation_state,\n
                                  language=\'en\',\n
-                                 order_by=[(\'version\', \'descending\')],\n
+                                 sort_on=[(\'version\', \'descending\')],\n
                                  group_by=(\'reference\',),\n
                                  limit=1,\n
                                  **kw)\n
@@ -115,7 +115,7 @@ if len(web_page_list) == 0:\n
   web_page_list = portal_catalog(reference=name,\n
                                  portal_type=valid_portal_type_list,\n
                                  validation_state=validation_state,\n
-                                 order_by=[(\'version\', \'descending\')],\n
+                                 sort_on=[(\'version\', \'descending\')],\n
                                  group_by=(\'reference\',),\n
                                  limit=1,\n
                                  **kw)\n
@@ -127,7 +127,7 @@ if len(web_page_list) == 0:\n
     web_page_list = portal_catalog(reference=name_without_web_site,\n
                                    portal_type=valid_portal_type_list,\n
                                    validation_state=validation_state,\n
-                                   order_by=[(\'version\', \'descending\')],\n
+                                   sort_on=[(\'version\', \'descending\')],\n
                                    group_by=(\'reference\',),\n
                                    limit=1,\n
                                    **kw)\n
@@ -139,7 +139,7 @@ if len(web_page_list) == 0:\n
     web_page_list = portal_catalog(reference=name_without_portal_type,\n
                                    portal_type=valid_portal_type_list,\n
                                    validation_state=validation_state,\n
-                                   order_by=[(\'version\', \'descending\')],\n
+                                   sort_on=[(\'version\', \'descending\')],\n
                                    group_by=(\'reference\',),\n
                                    limit=1,\n
                                    **kw)\n
@@ -151,7 +151,7 @@ if len(web_page_list) == 0:\n
     web_page_list = portal_catalog(reference=name_without_portal_type_and_web_site,\n
                                    portal_type=valid_portal_type_list,\n
                                    validation_state=validation_state,\n
-                                   order_by=[(\'version\', \'descending\')],\n
+                                   sort_on=[(\'version\', \'descending\')],\n
                                    group_by=(\'reference\',),\n
                                    limit=1,\n
                                    **kw)\n
@@ -163,7 +163,7 @@ if len(web_page_list) == 0:\n
     web_page_list = portal_catalog(reference=name_without_web_site_and_view,\n
                                    portal_type=valid_portal_type_list,\n
                                    validation_state=validation_state,\n
-                                   order_by=[(\'version\', \'descending\')],\n
+                                   sort_on=[(\'version\', \'descending\')],\n
                                    group_by=(\'reference\',),\n
                                    limit=1,\n
                                    **kw)\n
@@ -176,7 +176,7 @@ if len(web_page_list) == 0:\n
     web_page_list = portal_catalog(reference=state,\n
                                    portal_type=valid_portal_type_list,\n
                                    validation_state=validation_state,\n
-                                   order_by=[(\'version\', \'descending\')],\n
+                                   sort_on=[(\'version\', \'descending\')],\n
                                    group_by=(\'reference\',),\n
                                    limit=1,\n
                                    **kw)\n
diff --git a/bt5/erp5_egov/bt/revision b/bt5/erp5_egov/bt/revision
index 7d4983b989..c95da112f9 100644
--- a/bt5/erp5_egov/bt/revision
+++ b/bt5/erp5_egov/bt/revision
@@ -1 +1 @@
-458
\ No newline at end of file
+459
\ No newline at end of file
diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getDocumentValue.xml b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getDocumentValue.xml
index 40f2217b8c..cfef05939f 100644
--- a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getDocumentValue.xml
+++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getDocumentValue.xml
@@ -94,7 +94,7 @@ web_page_list = portal_catalog(reference=name,\n
                                portal_type=valid_portal_type_list,\n
                                validation_state=validation_state,\n
                                language=language,\n
-                               order_by=[(\'version\', \'descending\')],\n
+                               sort_on=[(\'version\', \'descending\')],\n
                                group_by=(\'reference\',),\n
                                **kw)\n
 \n
@@ -104,7 +104,7 @@ if len(web_page_list) == 0 and language != \'en\':\n
                                  portal_type=valid_portal_type_list,\n
                                  validation_state=validation_state,\n
                                  language=\'en\',\n
-                                 order_by=[(\'version\', \'descending\')],\n
+                                 sort_on=[(\'version\', \'descending\')],\n
                                  group_by=(\'reference\',),\n
                                  **kw)\n
 \n
@@ -113,7 +113,7 @@ if len(web_page_list) == 0:\n
   web_page_list = portal_catalog(reference=name,\n
                                  portal_type=valid_portal_type_list,\n
                                  validation_state=validation_state,\n
-                                 order_by=[(\'version\', \'descending\')],\n
+                                 sort_on=[(\'version\', \'descending\')],\n
                                  group_by=(\'reference\',),\n
                                  **kw)\n
 \n
diff --git a/bt5/erp5_web/bt/revision b/bt5/erp5_web/bt/revision
index 7e0a9d2ab7..e7fd4bfbe1 100644
--- a/bt5/erp5_web/bt/revision
+++ b/bt5/erp5_web/bt/revision
@@ -1 +1 @@
-837
\ No newline at end of file
+838
\ No newline at end of file
diff --git a/product/ERP5/Document/Document.py b/product/ERP5/Document/Document.py
index 8071fdb2d5..814cf8aef4 100644
--- a/product/ERP5/Document/Document.py
+++ b/product/ERP5/Document/Document.py
@@ -769,7 +769,7 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, ConversionCacheMixin, Sna
     catalog = getToolByName(self, 'portal_catalog', None)
     kw = dict(portal_type=self.getPortalType(),
                    reference=self.getReference(),
-                   order_by=(('version', 'descending', 'SIGNED'),)
+                   sort_on=(('version', 'descending', 'SIGNED'),)
                   )
     if version: kw['version'] = version
     if language: kw['language'] = language
-- 
2.30.9