Commit 3bc75f98 authored by Romain Courteaud's avatar Romain Courteaud

erp5_open_trade: fixup

parent 24f75d6f
......@@ -9,14 +9,11 @@ portal = context.getPortalObject()
for open_order_line in context.objectValues():
for ob in [open_order_line] + open_order_line.getCellValueList():
for item in ob.getAggregateValueList():
if now < ob.getStartDate():
# Do not expand the subscription if it is not yet started
# (this is a hack to prevent test errors when setting the zope datetime in the past)
continue
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