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