diff --git a/product/ERP5/Document/Delivery.py b/product/ERP5/Document/Delivery.py
index b028220f0db99da569b86af3f3af70d5b5af5df1..e89da1126df386a43d66a1a4d073a0be05d37e5f 100755
--- a/product/ERP5/Document/Delivery.py
+++ b/product/ERP5/Document/Delivery.py
@@ -520,7 +520,7 @@ class Delivery(XMLObject):
         my_applied_rule.setCausalityValue(self)
         # We must make sure this rule is indexed
         # now in order not to create another one later
-        my_applied_rule.reindexObject()
+        my_applied_rule.reindexObject(**kw)
       elif len(my_applied_rule_list) == 1:
         # Re expand the rule if possible
         my_applied_rule = my_applied_rule_list[0]
@@ -533,7 +533,8 @@ class Delivery(XMLObject):
       self.activate(
         after_path_and_method_id=(
                 my_applied_rule.getPath(),
-               ['immediateReindexObject', 'recursiveImmediateReindexObject'])
+               ['immediateReindexObject', 'recursiveImmediateReindexObject']),
+               **kw
         ).expand(my_applied_rule.getId(),force=force,**kw)
 
     security.declareProtected(Permissions.ModifyPortalContent, 'expand')
diff --git a/product/ERP5/Document/DeliveryBuilder.py b/product/ERP5/Document/DeliveryBuilder.py
index 4bf5158eb4541e532420d2de61d3024cfd33f035..5f928b50bf2f75e35bd61a48cdab3df2ab9db000 100755
--- a/product/ERP5/Document/DeliveryBuilder.py
+++ b/product/ERP5/Document/DeliveryBuilder.py
@@ -100,7 +100,7 @@ class DeliveryBuilder(OrderBuilder):
     """
     pass
   
-  def searchMovementList(self, applied_rule_uid=None):
+  def searchMovementList(self, applied_rule_uid=None,**kw):
     """
       defines how to query all Simulation Movements which meet certain criteria
       (including the above path path definition).
@@ -109,7 +109,6 @@ class DeliveryBuilder(OrderBuilder):
       Then, call script simulation_select_method to restrict movement_list
     """
     movement_list = []
-    kw = {}
     # We only search Simulation Movement
     kw['portal_type'] = 'Simulation Movement'
     # Search only child movement from this applied rule
diff --git a/product/ERP5/Document/Order.py b/product/ERP5/Document/Order.py
index eaac3216380af6e38cfe897bdc5a4db2e4a84cc9..0cd22aba3734e96539055768340f7f8a90257f6d 100755
--- a/product/ERP5/Document/Order.py
+++ b/product/ERP5/Document/Order.py
@@ -137,10 +137,10 @@ class Order(Delivery):
 
     ##########################################################################
     # Applied Rule stuff
-    def updateAppliedRule(self, rule_id="default_order_rule",force=0):
+    def updateAppliedRule(self, rule_id="default_order_rule",force=0,**kw):
       """
         XXX FIXME: Kept for compatibility
         updateAppliedRule must be call with the rule_id in workflow script
       """
-      Delivery.updateAppliedRule(self, rule_id, force=force)
+      Delivery.updateAppliedRule(self, rule_id, force=force,**kw)
 
diff --git a/product/ERP5/Document/OrderBuilder.py b/product/ERP5/Document/OrderBuilder.py
index e82f3f12fcce6d6093a9e9611ec9c577f8a10773..1b8fc8d547b91e3288a52295f4d424dd94bf1cbb 100755
--- a/product/ERP5/Document/OrderBuilder.py
+++ b/product/ERP5/Document/OrderBuilder.py
@@ -90,7 +90,7 @@ class OrderBuilder(XMLObject, Amount, Predicate):
  
   security.declareProtected(Permissions.ModifyPortalContent, 'build')
   def build(self, applied_rule_uid=None, movement_relative_url_list=None,
-            delivery_relative_url_list=None):
+            delivery_relative_url_list=None,**kw):
     """
       Build deliveries from a list of movements
 
@@ -108,7 +108,7 @@ class OrderBuilder(XMLObject, Amount, Predicate):
     # Select
     if movement_relative_url_list == []:
       movement_list = self.searchMovementList(
-                                      applied_rule_uid=applied_rule_uid)
+                                      applied_rule_uid=applied_rule_uid,**kw)
     else:
       movement_list = [self.restrictedTraverse(relative_url) for relative_url \
                        in movement_relative_url_list]
@@ -118,9 +118,9 @@ class OrderBuilder(XMLObject, Amount, Predicate):
     delivery_list = self.buildDeliveryList(
                        root_group,
                        delivery_relative_url_list=delivery_relative_url_list,
-                       movement_list=movement_list)
+                       movement_list=movement_list,**kw)
     # Call a script after building
-    self.callAfterBuildingScript(delivery_list)
+    self.callAfterBuildingScript(delivery_list,**kw)
     # XXX Returning the delivery list is probably not necessary
     return delivery_list
 
@@ -140,7 +140,7 @@ class OrderBuilder(XMLObject, Amount, Predicate):
       delivery_module = getattr(self, self.getDeliveryModule())
       getattr(delivery_module, delivery_module_before_building_script_id)()
 
-  def searchMovementList(self, applied_rule_uid=None):
+  def searchMovementList(self, applied_rule_uid=None,**kw):
     """
       Defines how to query all Simulation Movements which meet certain
       criteria (including the above path path definition).
@@ -151,7 +151,6 @@ class OrderBuilder(XMLObject, Amount, Predicate):
     """
     from Products.ERP5Type.Document import newTempMovement
     movement_list = []
-    kw = {}
     for attribute, method in [('node_uid', 'getDestinationUid'),
                               ('section_uid', 'getDestinationSectionUid')]:
       if getattr(self, method)() not in ("", None):
@@ -261,7 +260,7 @@ class OrderBuilder(XMLObject, Amount, Predicate):
     return result
 
   def buildDeliveryList(self, movement_group, delivery_relative_url_list=None,
-                        movement_list=None):
+                        movement_list=None,**kw):
     """
       Build deliveries from a list of movements
     """
@@ -511,7 +510,7 @@ class OrderBuilder(XMLObject, Amount, Predicate):
       #simulation_movement.setDeliveryRatio(1)
       simulation_movement.edit(delivery_ratio=1)
 
-  def callAfterBuildingScript(self, delivery_list):
+  def callAfterBuildingScript(self, delivery_list,**kw):
     """
       Call script on each delivery built
     """
diff --git a/product/ERP5/Document/PackingList.py b/product/ERP5/Document/PackingList.py
index 791031df9ad91ade9f5725dba618202a8d362c72..f90232399f4785b90694b9b0760c7d7ab613940c 100755
--- a/product/ERP5/Document/PackingList.py
+++ b/product/ERP5/Document/PackingList.py
@@ -113,9 +113,9 @@ class PackingList(Delivery):
 
     ##########################################################################
     # Applied Rule stuff
-    def updateAppliedRule(self, rule_id="default_delivery_rule"):
+    def updateAppliedRule(self, rule_id="default_delivery_rule",**kw):
       """
         XXX FIXME: Kept for compatibility
         updateAppliedRule must be call with the rule_id in workflow script
       """
-      Delivery.updateAppliedRule(self, rule_id)
+      Delivery.updateAppliedRule(self, rule_id,**kw)