[Erp5-report] r31146 kazuhiko - /erp5/trunk/products/ERP5/Document/BusinessProcess.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Dec 8 11:56:26 CET 2009


Author: kazuhiko
Date: Tue Dec  8 11:56:25 2009
New Revision: 31146

URL: http://svn.erp5.org?rev=31146&view=rev
Log:
use set.intersection because trade phase of a business path can be a list.

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=31146&r1=31145&r2=31146&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessProcess.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessProcess.py [utf8] Tue Dec  8 11:56:25 2009
@@ -88,8 +88,9 @@
     result = []
     if len(trade_phase) == 0:
       return self.objectValues(portal_type="Business Path")
+    trade_phase = set(trade_phase)
     for document in self.objectValues(portal_type="Business Path"):
-      if document.getTradePhase() in trade_phase:
+      if trade_phase.intersection(document.getTradePhaseList()):
         result.append(document)
     return result
 




More information about the Erp5-report mailing list