diff --git a/product/ERP5/Document/TradeCondition.py b/product/ERP5/Document/TradeCondition.py
index 4afa8df4c4025d8ffba274b061c83ba992313b6f..cafe25f242cfd4b364e9f3ad8e99a766e5d768e2 100644
--- a/product/ERP5/Document/TradeCondition.py
+++ b/product/ERP5/Document/TradeCondition.py
@@ -357,12 +357,8 @@ class TradeCondition(Path, Transformation, XMLMatrix):
       effective_model_list = []
       model_object_list = [result.getObject() for result in \
           self.portal_catalog(portal_type=self.portal_type,
-                              reference=reference,)]
-                              #sort_on=(('version','descending'),))]
-      # XXX currently, version is not catalogued, so sort using python
-      def sortByVersion(a, b):
-        return cmp(b.getVersion(), a.getVersion())
-      model_object_list.sort(sortByVersion)
+                              reference=reference,
+                              sort_on=(('version','descending'),))]
 
       # if there is model which has effective period containing
       # the start_date and the stop date of the paysheet, return it