Commit 71f2c2fe authored by Romain Courteaud's avatar Romain Courteaud

Need to reindex immediately AppliedRule after it has been created,

because _createDeliveryRule is called many times.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3214 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 74710532
...@@ -123,13 +123,14 @@ class PackingList(Delivery): ...@@ -123,13 +123,14 @@ class PackingList(Delivery):
my_applied_rule.setCausalityValue(self) my_applied_rule.setCausalityValue(self)
# We must make sure this rule is indexed # We must make sure this rule is indexed
# now in order not to create another one later # now in order not to create another one later
my_applied_rule.immediateReindexObject()
# XXX do not use flushActivity anymore ! # XXX do not use flushActivity anymore !
# my_applied_rule.flushActivity(invoke = 1) # my_applied_rule.flushActivity(invoke = 1)
elif len(my_applied_rule_list) == 1: elif len(my_applied_rule_list) == 1:
# Re expand the rule if possible # Re expand the rule if possible
my_applied_rule = my_applied_rule_list[0] my_applied_rule = my_applied_rule_list[0]
else: else:
raise SimulationError, 'Packing list %s has more than one applied\ raise "SimulationError", 'Packing list %s has more than one applied\
rule.' % self.getRelativeUrl() rule.' % self.getRelativeUrl()
# We are now certain we have a single applied rule # We are now certain we have a single applied rule
......
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