Commit 80d978d7 authored by Sebastien Robin's avatar Sebastien Robin

propagate activate_kw to simulation_movement reindexing activities

when we call build with activate_kw


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24124 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ddcf29ee
......@@ -144,7 +144,7 @@ class DeliveryBuilder(OrderBuilder):
def _setDeliveryMovementProperties(self, delivery_movement,
simulation_movement, property_dict,
update_existing_movement=0,
force_update=0):
force_update=0, activate_kw=None):
"""
Initialize or update delivery movement properties.
Set delivery ratio on simulation movement.
......@@ -155,8 +155,10 @@ class DeliveryBuilder(OrderBuilder):
self, delivery_movement,
simulation_movement, property_dict,
update_existing_movement=update_existing_movement,
force_update=force_update)
simulation_movement.edit(delivery_value=delivery_movement)
force_update=force_update,
activate_kw=activate_kw)
simulation_movement.edit(delivery_value=delivery_movement,
activate_kw=activate_kw)
# Simulation consistency propagation
security.declareProtected(Permissions.ModifyPortalContent,
......
......@@ -629,12 +629,12 @@ class OrderBuilder(XMLObject, Amount, Predicate):
self._setDeliveryMovementProperties(
object_to_update, movement, property_dict,
update_existing_movement=update_existing_movement,
force_update=force_update)
force_update=force_update, activate_kw=activate_kw)
def _setDeliveryMovementProperties(self, delivery_movement,
simulation_movement, property_dict,
update_existing_movement=0,
force_update=0):
force_update=0, activate_kw=None):
"""
Initialize or update delivery movement properties.
Set delivery ratio on simulation movement.
......
......@@ -466,10 +466,13 @@ class FakeMovement:
return self.__movement_list[0].getVariationCategoryList(
omit_optional_variation=omit_optional_variation, **kw)
def edit(self, **kw):
def edit(self, activate_kw=None, **kw):
"""
Written in order to call edit in delivery builder,
as it is the generic way to modify object.
activate_kw is here for compatibility reason with Base.edit,
it will not be used here.
"""
for key in kw.keys():
if key == 'delivery_ratio':
......
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