Commit 920cb544 authored by Guillaume Michon's avatar Guillaume Michon

Removed the immediateReindexObject() calls added in the previous commit


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3351 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0203757b
......@@ -466,8 +466,8 @@ class DeliveryBuilder(XMLObject, Amount, Predicate):
simulation_movement.setDeliveryValue(delivery_movement)
# To update the divergence status, the simulation movement must be reindexed
# and the delivery must be touched.
simulation_movement.immediateReindexObject()
delivery_movement.edit()
#simulation_movement.immediateReindexObject()
delivery_movement.activate(after_path_and_method_id = (simulation_movement.getPath(), ['immediateReindexObject', 'recursiveImmediateReindexObject'])).edit()
# Simulation consistency propagation
security.declareProtected(Permissions.ModifyPortalContent,
......@@ -525,9 +525,12 @@ class DeliveryBuilder(XMLObject, Amount, Predicate):
movement.edit(quantity=total_quantity)
# To update the divergence status, the simulation movements
# must be reindexed, and then the delivery must be touched
path_list = []
for simulation_movement in movement.getDeliveryRelatedValueList():
simulation_movement.immediateReindexObject()
movement.edit()
#simulation_movement.immediateReindexObject()
simulation_movement.edit()
path_list.append(simulation_movement.getPath())
movement.activate(after_path_and_method_id = (path_list, ['immediateReindexObject', 'recursiveImmediateReindexObject'])).edit()
# Launch delivery creation
if (create_new_delivery == 1) and\
......
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