[Erp5-report] r27794 - /erp5/trunk/products/ERP5/Document/TradeCondition.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jun 25 09:43:44 CEST 2009
Author: fabien
Date: Thu Jun 25 09:43:44 2009
New Revision: 27794
URL: http://svn.erp5.org?rev=27794&view=rev
Log:
version is now catalogued and cmp is performance killer so use sorting from the catalog.
Thanks to Kazuhico for his review
Modified:
erp5/trunk/products/ERP5/Document/TradeCondition.py
Modified: erp5/trunk/products/ERP5/Document/TradeCondition.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TradeCondition.py?rev=27794&r1=27793&r2=27794&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TradeCondition.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TradeCondition.py [utf8] Thu Jun 25 09:43:44 2009
@@ -357,12 +357,8 @@
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
More information about the Erp5-report
mailing list