[Erp5-report] r34487 jm - /erp5/trunk/products/ERP5/Document/BPMBuilder.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Apr 13 11:08:38 CEST 2010


Author: jm
Date: Tue Apr 13 11:08:36 2010
New Revision: 34487

URL: http://svn.erp5.org?rev=34487&view=rev
Log:
Fix calculation of select_method in BPMBuilder.searchMovementList

- use self instead of portal as context
- _getTypeBasedMethod return the object directly (not its name)

Modified:
    erp5/trunk/products/ERP5/Document/BPMBuilder.py

Modified: erp5/trunk/products/ERP5/Document/BPMBuilder.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BPMBuilder.py?rev=34487&r1=34486&r2=34487&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BPMBuilder.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BPMBuilder.py [utf8] Tue Apr 13 11:08:36 2010
@@ -152,9 +152,11 @@
     # We only search Simulation Movement - Luke do not know why...
     kw['portal_type'] = 'Simulation Movement' # blah!
 
-    select_method = getattr(self.getPortalObject(),
-        self.simulation_select_method_id or
-        self._getTypeBasedMethod('_selectDefaultMovement'))
+    method_id = self.getSimulationSelectMethodId()
+    if method_id:
+      select_method = getattr(self, method_id)
+    else:
+      select_method = self._getTypeBasedMethod('_selectDefaultMovement')
     input_movement_value_list = select_method(**kw)
 
     movement_dict = {}




More information about the Erp5-report mailing list