Commit 85921e90 authored by Guillaume Michon's avatar Guillaume Michon

Removed activate() call (it is done in an interaction workflow now)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3367 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 26d2825e
...@@ -54,14 +54,16 @@ class Distribute(DeliverySolver): ...@@ -54,14 +54,16 @@ class Distribute(DeliverySolver):
if simulation_quantity != 0: if simulation_quantity != 0:
for simulation_movement in simulation_movement_list: for simulation_movement in simulation_movement_list:
simulation_movement.setDeliveryRatio(simulation_movement.getCorrectedQuantity() / simulation_quantity) #simulation_movement.setDeliveryRatio(simulation_movement.getCorrectedQuantity() / simulation_quantity)
simulation_movement.edit(delivery_ratio = simulation_movement.getCorrectedQuantity() / simulation_quantity)
#simulation_movement.immediateReindexObject() #simulation_movement.immediateReindexObject()
else: else:
if len(simulation_movement_list) > 0: if len(simulation_movement_list) > 0:
delivery_ratio = 1./len(simulation_movement_list) delivery_ratio = 1./len(simulation_movement_list)
for simulation_movement in simulation_movement_list: for simulation_movement in simulation_movement_list:
simulation_movement.setDeliveryRatio(delivery_ratio) #simulation_movement.setDeliveryRatio(delivery_ratio)
simulation_movement.edit(delivery_ratio = delivery_ratio)
movement.activate(after_path_and_method_id=([m.getPath() for m in simulation_movement_list], ['immediateReindexObject', 'recursiveImmediateReindexObject'])).edit() #movement.activate(after_path_and_method_id=([m.getPath() for m in simulation_movement_list], ['immediateReindexObject', 'recursiveImmediateReindexObject'])).edit()
#registerDeliverySolver(Distribute) #registerDeliverySolver(Distribute)
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