Commit 04637d8c authored by Vincent Pelletier's avatar Vincent Pelletier

Add an activate_kw argument to separate activate() parameters from activated function parameters.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12682 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 50383cc1
......@@ -150,7 +150,7 @@ class Order(Delivery):
Reindex children and simulation
"""
# Now the applied rule is expanded
Delivery.recursiveReindexObject(self, *k, **kw)
Delivery.recursiveReindexObject(self, activate_kw=activate_kw, *k, **kw)
self.expandAppliedRuleRelatedToOrder(activate_kw=activate_kw, **kw)
def expandAppliedRuleRelatedToOrder(self, activate_kw=None,**kw):
......
......@@ -76,9 +76,9 @@ class OrderCell(DeliveryCell):
self.recursiveReindexObject(*k,**kw)
security.declarePublic('recursiveReindexObject')
def recursiveReindexObject(self, *k, **kw):
def recursiveReindexObject(self, activate_kw={}, *k, **kw):
"""
Reindex children and simulation
"""
self.getExplanationValue().expandAppliedRuleRelatedToOrder(**kw)
DeliveryCell.recursiveReindexObject(self, *k, **kw)
self.getExplanationValue().expandAppliedRuleRelatedToOrder(activate_kw=activate_kw, **kw)
DeliveryCell.recursiveReindexObject(self, activate_kw=activate_kw, *k, **kw)
......@@ -79,12 +79,12 @@ class OrderLine(DeliveryLine):
getattr(my_simulation_movement, method_id)()
security.declarePublic('recursiveReindexObject')
def recursiveReindexObject(self, *k, **kw):
def recursiveReindexObject(self, activate_kw={}, *k, **kw):
"""
Reindex children and simulation
"""
self.getExplanationValue().expandAppliedRuleRelatedToOrder(**kw)
DeliveryLine.recursiveReindexObject(self, *k, **kw)
self.getExplanationValue().expandAppliedRuleRelatedToOrder(activate_kw=activate_kw, **kw)
DeliveryLine.recursiveReindexObject(self, activate_kw=activate_kw, *k, **kw)
#self.activate().applyToOrderLineRelatedMovement(method_id = 'expand')
# We do it at Order level through edit
# This logic should actually be put in worklow
......
......@@ -528,14 +528,14 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn):
self.recursiveReindexObject()
security.declarePublic( 'recursiveReindexObject' )
def recursiveReindexObject(self, *args, **kw):
def recursiveReindexObject(self, activate_kw={}, *args, **kw):
"""
Fixes the hierarchy structure (use of Base class)
XXXXXXXXXXXXXXXXXXXXXXXX
BUG here : when creating a new base category
"""
if self.isIndexable:
self.activate(group_method_id='portal_catalog/catalogObjectList', expand_method_id='getIndexableChildValueList', alternate_method_id='alternateReindexObject', **kw).recursiveImmediateReindexObject(*args, **kw)
self.activate(group_method_id='portal_catalog/catalogObjectList', expand_method_id='getIndexableChildValueList', alternate_method_id='alternateReindexObject', **activate_kw).recursiveImmediateReindexObject(*args, **kw)
security.declareProtected( Permissions.AccessContentsInformation, 'getIndexableChildValueList' )
def getIndexableChildValueList(self):
......
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