Commit 6fa61518 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

simplify the code.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32571 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a8e09ae0
......@@ -56,13 +56,11 @@ class CausalityAssignmentMovementGroup(MovementGroup):
def _addCausalityToEdit(self, movement, property_dict=None):
if property_dict is None:
property_dict = {}
parent = movement
# Go upper into the simulation tree in order to find an order link
while not parent.isRootAppliedRule():
parent = parent.getParentValue()
causality_list = property_dict.get('causality_list', [])
root_movement = movement.getRootSimulationMovement()
# 'order' category is deprecated. it is kept for compatibility.
movement_list = parent.getOrderList() or parent.getDeliveryList()
movement_list = root_movement.getOrderList() or \
root_movement.getDeliveryList()
for delivery_movement in movement_list:
if delivery_movement not in causality_list:
causality_list.append(delivery_movement)
......
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