[Erp5-report] r32153 kazuhiko - /erp5/trunk/products/ERP5/Document/BusinessProcess.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Feb 1 16:41:56 CET 2010
Author: kazuhiko
Date: Mon Feb 1 16:41:49 2010
New Revision: 32153
URL: http://svn.erp5.org?rev=32153&view=rev
Log:
business paths should be sorted by int_index.
Modified:
erp5/trunk/products/ERP5/Document/BusinessProcess.py
Modified: erp5/trunk/products/ERP5/Document/BusinessProcess.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessProcess.py?rev=32153&r1=32152&r2=32153&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessProcess.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessProcess.py [utf8] Mon Feb 1 16:41:49 2010
@@ -86,10 +86,12 @@
elif not isinstance(trade_phase, (list, tuple)):
trade_phase = (trade_phase,)
result = []
+ business_path_list = sorted(self.objectValues(portal_type="Business Path"),
+ key=lambda x:x.getIntIndex())
if len(trade_phase) == 0:
- return self.objectValues(portal_type="Business Path")
+ return business_path_list
trade_phase = set(trade_phase)
- for document in self.objectValues(portal_type="Business Path"):
+ for document in business_path_list:
if trade_phase.intersection(document.getTradePhaseList()):
result.append(document)
return result
More information about the Erp5-report
mailing list