diff --git a/product/ERP5/mixin/rule.py b/product/ERP5/mixin/rule.py index 8cca344cb975c6c463a932c1a2b7c8259e231a6b..bbb393e830f0d5f38b85976a45f82f083d268669 100644 --- a/product/ERP5/mixin/rule.py +++ b/product/ERP5/mixin/rule.py @@ -421,14 +421,7 @@ class RuleMixin(Predicate): kw = {} for tester in profit_updating_tester_list: if not tester.compare(prevision_movement, decision_movement): - # Only update those updatable properties which are not recorded - 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) + kw.update(tester.getUpdatablePropertyDict(prevision_movement, decision_movement)) if kw: movement_collection_diff.addUpdatableMovement(decision_movement, kw) else: @@ -446,14 +439,7 @@ class RuleMixin(Predicate): kw = {} for tester in updating_tester_list: if not tester.compare(prevision_movement, decision_movement): - # Only update those updatable properties which are not recorded - 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) + kw.update(tester.getUpdatablePropertyDict(prevision_movement, decision_movement)) # XXX-JPS - there is a risk here that quantity is wrongly updated if kw: movement_collection_diff.addUpdatableMovement(decision_movement, kw)