Commit 25dde018 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

if delivery category is used in root applied rule, we don't want to check if...

if delivery category is used in root applied rule, we don't want to check if we have delivery in the first level simulation movement to determine if the simulation is mutable or deletable.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35806 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cc164f92
...@@ -330,11 +330,19 @@ class Rule(Predicate, XMLObject): ...@@ -330,11 +330,19 @@ class Rule(Predicate, XMLObject):
mutable_movement_list = [] mutable_movement_list = []
deletable_movement_list = [] deletable_movement_list = []
is_root = applied_rule.isRootAppliedRule()
for movement in applied_rule.contentValues(portal_type=self.movement_type): for movement in applied_rule.contentValues(portal_type=self.movement_type):
# XXX in root applied rule case, movement.isFrozen() is not a good
# criteria to determine if movement is immutable or not. Same for
# non-root case?
if movement.isFrozen(): if movement.isFrozen():
immutable_movement_list.append(movement) immutable_movement_list.append(movement)
else: else:
if movement._isTreeDelivered(): if is_root and movement.hasOrder():
ignore_first = False
else:
ignore_first = True
if movement._isTreeDelivered(ignore_first=ignore_first):
mutable_movement_list.append(movement) mutable_movement_list.append(movement)
else: else:
deletable_movement_list.append(movement) deletable_movement_list.append(movement)
......
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