[Erp5-report] r36586 nicolas.dumazet - /erp5/trunk/products/ERP5/Document/
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jun 25 12:26:09 CEST 2010
Author: nicolas.dumazet
Date: Fri Jun 25 12:26:07 2010
New Revision: 36586
URL: http://svn.erp5.org?rev=36586&view=rev
Log:
The benefits of this "optimization" is not obvious as
BusinessPath.isCompleted calls are quite expensive
Removing it with the previous improvements actually leads
to before performance.
Modified:
erp5/trunk/products/ERP5/Document/SimulationMovement.py
Modified: erp5/trunk/products/ERP5/Document/SimulationMovement.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/SimulationMovement.py?rev=36586&r1=36585&r2=36586&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/SimulationMovement.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/SimulationMovement.py [utf8] Fri Jun 25 12:26:07 2010
@@ -585,6 +585,7 @@ class SimulationMovement(Movement, Prope
causality = parent_path.getRelativeUrl()
related_simulation_list = causality_dict.get(causality, [])
+ completed_state_list = parent_path.getCompletedStateList()
for business_path_movement in related_simulation_list:
if parent_path.isMovementRelatedWithMovement(self,
business_path_movement):
@@ -592,14 +593,7 @@ class SimulationMovement(Movement, Prope
.getDeliveryValue()
if business_path_movement_delivery is None:
return False # related movement is not delivered yet
-
- business_path_movement_delivery_document = \
- business_path_movement_delivery.getExplanationValue()
- # here we can optimise somehow, as
- # business_path_movement_delivery_document would repeat
- if not parent_path.isCompleted(
- business_path_movement_delivery_document):
- # related movements delivery is not completed
+ if business_path_movement.getSimulationState() not in completed_state_list:
return False
return True
More information about the Erp5-report
mailing list