Commit 8ebfb938 authored by Łukasz Nowak's avatar Łukasz Nowak

Drop links in correct place.

parent 255e6e64
......@@ -130,11 +130,6 @@ class SimulatedDeliveryBuilder(BuilderMixin):
if movement.isBuildable(business_link):
if movement.getDeliveryValueList()==[]:
movement_list.append(movement)
else:
# drop causality links to Business Paths/States
movement.setCausalityList([q.getRelativeUrl() for q in \
movement.getCausalityValueList() if q.getPortalType() \
not in self.getPortalBusinessLinkTypeList()])
# XXX Add predicate test
# XXX FIXME Check that there is no double in the list
# Because we can't trust simulation_select_method
......
......@@ -146,6 +146,12 @@ class BuilderMixin(XMLObject, Amount, Predicate):
root_group_node,
delivery_relative_url_list=delivery_relative_url_list,
movement_list=movement_list,**kw)
# After building reset links to Business Links
business_link_portal_type_list = self.getPortalBusinessLinkTypeList()
for movement in movement_list:
movement.setCausalityList([q.getRelativeUrl() for q in \
movement.getCausalityValueList() if q.getPortalType() \
not in business_link_portal_type_list])
# Call a script after building
self.callAfterBuildingScript(delivery_list, movement_list, **kw)
return delivery_list
......
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