Commit 95e4d93a authored by Nicolas Dumazet's avatar Nicolas Dumazet

Syle only: add linebreaks, save indentation to improve readability.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31470 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1fb82d4a
...@@ -561,32 +561,36 @@ class SimulationMovement(Movement, PropertyRecordableMixin): ...@@ -561,32 +561,36 @@ class SimulationMovement(Movement, PropertyRecordableMixin):
if self.getDeliveryValue() is not None: if self.getDeliveryValue() is not None:
# already delivered # already delivered
return False return False
# might be buildable - business path depended # might be buildable - business path depended
business_path = self.getCausalityValue(portal_type='Business Path') business_path = self.getCausalityValue(portal_type='Business Path')
explanation_value = self.getExplanationValue() explanation_value = self.getExplanationValue()
if business_path is not None and explanation_value is not None:
predecessor = business_path.getPredecessorValue() if business_path is None or explanation_value is None:
if predecessor is None: return True
# first one, can be built predecessor = business_path.getPredecessorValue()
return True if predecessor is None:
else: # first one, can be built
for successor_related in predecessor.getSuccessorRelatedValueList(): return True
for business_path_movement in successor_related \
.getRelatedSimulationMovementValueList(explanation_value): for successor_related in predecessor.getSuccessorRelatedValueList():
if successor_related.isMovementRelatedWithMovement(self, for business_path_movement in successor_related \
business_path_movement): .getRelatedSimulationMovementValueList(explanation_value):
business_path_movement_delivery = business_path_movement \ if successor_related.isMovementRelatedWithMovement(self,
.getDeliveryValue() business_path_movement):
if business_path_movement_delivery is None: business_path_movement_delivery = business_path_movement \
return False # related movement is not delivered yet .getDeliveryValue()
business_path_movement_delivery_document = \ if business_path_movement_delivery is None:
business_path_movement_delivery.getParentValue() return False # related movement is not delivered yet
# here we can optimise somehow, as
# business_path_movement_delivery_document would repeat business_path_movement_delivery_document = \
if not successor_related.isCompleted( business_path_movement_delivery.getParentValue()
business_path_movement_delivery_document): # here we can optimise somehow, as
# related movements delivery is not completed # business_path_movement_delivery_document would repeat
return False if not successor_related.isCompleted(
business_path_movement_delivery_document):
# related movements delivery is not completed
return False
return True return True
security.declareProtected( Permissions.ModifyPortalContent, security.declareProtected( Permissions.ModifyPortalContent,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment