Commit 6a0c55f0 authored by Romain Courteaud's avatar Romain Courteaud

erp5_open_trade: do not expand open order which are not yet started

parent 8c5fb511
......@@ -12,7 +12,8 @@ for open_order_line in context.objectValues():
if getattr(item.aq_explicit, 'updateSimulation', None) is not None and \
item not in subscription_item_set:
subscription_item_set.add(item)
stop_date = item.getNextPeriodicalDate(now)
# If start_date is in futur, do not look for unreachable period
stop_date = item.getNextPeriodicalDate(max(now, ob.getStartDate()))
# Do not expand subscription item if there is
# no new simulation movement to create
# (expand always reindex the full simulation tree,
......
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