Commit 09d4b75e authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_base&simulation: be able to set related order in order to group movement into one delivery

parent 6f387a63
...@@ -46,6 +46,10 @@ class OrderMovementGroup(MovementGroup): ...@@ -46,6 +46,10 @@ class OrderMovementGroup(MovementGroup):
).issubset(movement.getCausalityList()), {} ).issubset(movement.getCausalityList()), {}
def _getOrderRelativeUrl(self, movement): def _getOrderRelativeUrl(self, movement):
order_relative_url = getattr(movement, 'order_relative_url', None)
if order_relative_url:
return order_relative_url
try: try:
getRootAppliedRule = movement.getRootAppliedRule getRootAppliedRule = movement.getRootAppliedRule
except AttributeError: except AttributeError:
......
...@@ -137,6 +137,9 @@ class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject): ...@@ -137,6 +137,9 @@ class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
destination = configuration_dict.get('destination', None) destination = configuration_dict.get('destination', None)
if destination: if destination:
new_movement.setDestination(destination) new_movement.setDestination(destination)
order_relative_url = configuration_dict.get('order_relative_url', None)
if order_relative_url:
new_movement.edit(order_relative_url = order_relative_url)
if activate_kw: if activate_kw:
new_movement.setDefaultActivateParameterDict({}) new_movement.setDefaultActivateParameterDict({})
simulation_movement.expand(activate_kw=activate_kw) simulation_movement.expand(activate_kw=activate_kw)
......
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