Commit e064af7d authored by Romain Courteaud's avatar Romain Courteaud

_createOrderRule must fail if more than one applied rule exist, instead of...

_createOrderRule must fail if more than one applied rule exist, instead of trying to correct simulation.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2819 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d05c9d7d
...@@ -103,13 +103,8 @@ class Order(Delivery): ...@@ -103,13 +103,8 @@ class Order(Delivery):
# 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:
# Delete first rules and re expand if possible raise SimulationError, 'Order %s has more than one applied rule.' %\
for my_applied_rule in my_applied_rule_list[0:-1]: self.getRelativeUrl()
# XXX Must not call flushActivity !
# But must remove activities related to those objects
#my_applied_rule.flushActivity(invoke=0)
my_applied_rule.aq_parent._delObject(my_applied_rule.getId())
my_applied_rule = my_applied_rule_list[-1]
# 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
......
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