From aa64ed0ad6b8f629faeb92fd8d13dbf6f6ab6d01 Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Fri, 2 Sep 2005 13:14:40 +0000
Subject: [PATCH] reindex simulation movement when we do expand

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3730 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/OrderRule.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/product/ERP5/Document/OrderRule.py b/product/ERP5/Document/OrderRule.py
index f08e74af68..bb379b4676 100755
--- a/product/ERP5/Document/OrderRule.py
+++ b/product/ERP5/Document/OrderRule.py
@@ -94,6 +94,8 @@ class OrderRule(DeliveryRule):
               # XXX Make sure this is not deleted if already in delivery
               applied_rule._delObject(movement.getId())  
             else:
+              # We need to reindex, because the value acquired by simulation movement may change
+              movement.reindexObject()
               existing_uid_list_append(order_value.getUid())
           # Build simulation movement if necessary
           for order_movement in my_order.getMovementList():
-- 
2.30.9