Commit 6b57bbc9 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

aggregation is not required here, because we want to have one simulation...

aggregation is not required here, because we want to have one simulation movement per one order line just same as before.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34189 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5e44bfc2
...@@ -95,23 +95,7 @@ class MovementCollectionUpdaterMixin: ...@@ -95,23 +95,7 @@ class MovementCollectionUpdaterMixin:
else: else:
tester_key.append(None) tester_key.append(None)
tester_key = tuple(tester_key) tester_key = tuple(tester_key)
# try to aggregate prevision_movement_dict.setdefault(tester_key, []).append(movement)
aggregated_movement_list = prevision_movement_dict.setdefault(tester_key,
[])
no_match = True
for aggregated_movement in aggregated_movement_list:
if _compare(tester_list, aggregated_movement, movement):
no_match = False
order = movement.getOrder()
if order is not None:
aggregated_movement.setOrderList(
aggregated_movement.getOrderList() + [order])
aggregated_movement.setConvertedQuantity(
aggregated_movement.getConvertedQuantity() + \
movement.getConvertedQuantity())
if no_match:
aggregated_movement_list.append(movement)
prevision_movement_dict[tester_key] = aggregated_movement_list
# Prepare a mapping between prevision and decision # Prepare a mapping between prevision and decision
# The prevision_to_decision_map is a list of tuples # The prevision_to_decision_map is a list of tuples
......
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