Commit 11d4ac00 authored by Jérome Perrin's avatar Jérome Perrin

remove force= argument that does not make any sense now


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43734 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dd8768db
...@@ -690,8 +690,7 @@ class Delivery(XMLObject, ImmobilisationDelivery, ...@@ -690,8 +690,7 @@ class Delivery(XMLObject, ImmobilisationDelivery,
########################################################################## ##########################################################################
# Applied Rule stuff # Applied Rule stuff
@UnrestrictedMethod # XXX-JPS What is this ? @UnrestrictedMethod # XXX-JPS What is this ?
def updateAppliedRule(self, rule_reference=None, rule_id=None, force=0, def updateAppliedRule(self, rule_reference=None, rule_id=None, **kw):
**kw):
""" """
Create a new Applied Rule if none is related, or call expand Create a new Applied Rule if none is related, or call expand
on the existing one. on the existing one.
...@@ -723,9 +722,9 @@ class Delivery(XMLObject, ImmobilisationDelivery, ...@@ -723,9 +722,9 @@ class Delivery(XMLObject, ImmobilisationDelivery,
else: else:
raise ValueError, 'No such rule as %r is found' % rule_reference raise ValueError, 'No such rule as %r is found' % rule_reference
self._createAppliedRule(rule_id, force=force, **kw) self._createAppliedRule(rule_id, **kw)
def _createAppliedRule(self, rule_id, force=0, activate_kw=None, **kw): def _createAppliedRule(self, rule_id, activate_kw=None, **kw):
""" """
Create a new Applied Rule is none is related, or call expand Create a new Applied Rule is none is related, or call expand
on the existing one. on the existing one.
...@@ -768,12 +767,12 @@ class Delivery(XMLObject, ImmobilisationDelivery, ...@@ -768,12 +767,12 @@ class Delivery(XMLObject, ImmobilisationDelivery,
# We are now certain we have a single applied rule # We are now certain we have a single applied rule
# It is time to expand it # It is time to expand it
self.activate(activate_kw=activate_kw, **expand_activate_kw).expand( self.activate(activate_kw=activate_kw, **expand_activate_kw).expand(
applied_rule_id=my_applied_rule_id, force=force, applied_rule_id=my_applied_rule_id,
activate_kw=activate_kw, **kw) activate_kw=activate_kw, **kw)
security.declareProtected(Permissions.ModifyPortalContent, 'expand') security.declareProtected(Permissions.ModifyPortalContent, 'expand')
@UnrestrictedMethod @UnrestrictedMethod
def expand(self, applied_rule_id=None, force=0, activate_kw=None,**kw): def expand(self, applied_rule_id=None, activate_kw=None,**kw):
""" """
Reexpand applied rule Reexpand applied rule
...@@ -786,7 +785,7 @@ class Delivery(XMLObject, ImmobilisationDelivery, ...@@ -786,7 +785,7 @@ class Delivery(XMLObject, ImmobilisationDelivery,
my_applied_rule = self.portal_simulation.get(applied_rule_id, None) my_applied_rule = self.portal_simulation.get(applied_rule_id, None)
if my_applied_rule is not None: if my_applied_rule is not None:
excluded_rule_path_list.append(my_applied_rule.getPath()) excluded_rule_path_list.append(my_applied_rule.getPath())
my_applied_rule.expand(force=force, activate_kw=activate_kw,**kw) my_applied_rule.expand(activate_kw=activate_kw,**kw)
# once expanded, the applied_rule must be reindexed # once expanded, the applied_rule must be reindexed
# because some simulation_movement may change even # because some simulation_movement may change even
# if there are not edited (acquisition) # if there are not edited (acquisition)
...@@ -806,7 +805,6 @@ class Delivery(XMLObject, ImmobilisationDelivery, ...@@ -806,7 +805,6 @@ class Delivery(XMLObject, ImmobilisationDelivery,
(applied_rule_id, self.getId())) (applied_rule_id, self.getId()))
self.expandRuleRelatedToMovement( self.expandRuleRelatedToMovement(
excluded_rule_path_list=excluded_rule_path_list, excluded_rule_path_list=excluded_rule_path_list,
force=force,
activate_kw=activate_kw, activate_kw=activate_kw,
**kw) **kw)
......
...@@ -43,7 +43,7 @@ class IExpandable(Interface): ...@@ -43,7 +43,7 @@ class IExpandable(Interface):
(which have been previously built). (which have been previously built).
""" """
def expand(applied_rule_id=None, force=False, activate_kw=None, **kw): def expand(applied_rule_id=None, activate_kw=None, **kw):
""" """
Expand the current Expandable class into the simulation. Expand the current Expandable class into the simulation.
If no applied_rule_id is provided, try first to find If no applied_rule_id is provided, try first to find
...@@ -53,9 +53,5 @@ class IExpandable(Interface): ...@@ -53,9 +53,5 @@ class IExpandable(Interface):
be provided to reindex the whole be provided to reindex the whole
simulation tree from the root applied rule simulation tree from the root applied rule
force -- (LEGACY) this named parameter is no longer used. It
used to be required because of unclear specification
of expand stability
activate_kw -- (TO BE EXPLAINED BY KAZ) activate_kw -- (TO BE EXPLAINED BY KAZ)
""" """
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