Commit 24f75d6f authored by Romain Courteaud's avatar Romain Courteaud

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

parent 439b675b
......@@ -9,6 +9,10 @@ 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)
......
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