Commit d17eb18d authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

revert this part, because if re-expand occurs from the upward for simulation...

revert this part, because if re-expand occurs from the upward for simulation movements that already have recorded properties and we have differences between upward values and recorded values, we need to update anyway (and to clear recorded propertyes that are already well implemented in other place).
this should fix the current failure of test_19_ChangeResourceOnPackingListAndOrder in testPackingList.py.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44611 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b5b89790
...@@ -421,14 +421,7 @@ class RuleMixin(Predicate): ...@@ -421,14 +421,7 @@ class RuleMixin(Predicate):
kw = {} kw = {}
for tester in profit_updating_tester_list: for tester in profit_updating_tester_list:
if not tester.compare(prevision_movement, decision_movement): if not tester.compare(prevision_movement, decision_movement):
# Only update those updatable properties which are not recorded kw.update(tester.getUpdatablePropertyDict(prevision_movement, decision_movement))
kw_candidate = tester.getUpdatablePropertyDict(prevision_movement,
decision_movement)
accept_candidate = True
for property_key in kw_candidate.keys():
if decision_movement.isPropertyRecorded(property_key):
del kw_candidate[property_key]
kw.update(kw_candidate)
if kw: if kw:
movement_collection_diff.addUpdatableMovement(decision_movement, kw) movement_collection_diff.addUpdatableMovement(decision_movement, kw)
else: else:
...@@ -446,14 +439,7 @@ class RuleMixin(Predicate): ...@@ -446,14 +439,7 @@ class RuleMixin(Predicate):
kw = {} kw = {}
for tester in updating_tester_list: for tester in updating_tester_list:
if not tester.compare(prevision_movement, decision_movement): if not tester.compare(prevision_movement, decision_movement):
# Only update those updatable properties which are not recorded kw.update(tester.getUpdatablePropertyDict(prevision_movement, decision_movement))
kw_candidate = tester.getUpdatablePropertyDict(prevision_movement,
decision_movement)
accept_candidate = True
for property_key in kw_candidate.keys():
if decision_movement.isPropertyRecorded(property_key):
del kw_candidate[property_key]
kw.update(kw_candidate)
# XXX-JPS - there is a risk here that quantity is wrongly updated # XXX-JPS - there is a risk here that quantity is wrongly updated
if kw: if kw:
movement_collection_diff.addUpdatableMovement(decision_movement, kw) movement_collection_diff.addUpdatableMovement(decision_movement, kw)
......
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