Commit 532177a5 authored by Jérome Perrin's avatar Jérome Perrin

instead of hardconding Tax Line, use order movement type list (which should not

contain tax lines)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20496 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4b9ae0f0
...@@ -79,7 +79,8 @@ class OrderRule(DeliveryRule): ...@@ -79,7 +79,8 @@ class OrderRule(DeliveryRule):
immutable_movement_list = [] immutable_movement_list = []
order = applied_rule.getDefaultCausalityValue() order = applied_rule.getDefaultCausalityValue()
if order is not None: if order is not None:
order_movement_list = order.getMovementList() order_movement_list = order.getMovementList(
portal_type=order.getPortalOrderMovementTypeList()):
# check existing movements # check existing movements
for movement in applied_rule.contentValues(portal_type=movement_type): for movement in applied_rule.contentValues(portal_type=movement_type):
if (not movement.getLastExpandSimulationState() in if (not movement.getLastExpandSimulationState() in
...@@ -106,9 +107,6 @@ class OrderRule(DeliveryRule): ...@@ -106,9 +107,6 @@ class OrderRule(DeliveryRule):
order_movement_dict[order_movement.getPath()] = s_m order_movement_dict[order_movement.getPath()] = s_m
# Create or modify movements # Create or modify movements
for movement in order_movement_list: for movement in order_movement_list:
# FIXME: to be improved later
if movement.getPortalType() not in ('Tax Line', ):
continue
related_order = order_movement_dict.get(movement.getPath(), None) related_order = order_movement_dict.get(movement.getPath(), None)
if related_order is None: if related_order is None:
related_order = movement.getOrderRelatedValue() related_order = movement.getOrderRelatedValue()
......
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