From abc4bb3a62b68e7e3f91a2b5be137396586270af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Fri, 27 Jan 2012 09:59:36 +0100 Subject: [PATCH] Revert "Stop generation just bit after current moment." This reverts commit cb0da24fe66f7e77082148c719983b073210cd17. --- product/ERP5/Document/SubscriptionItem.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/product/ERP5/Document/SubscriptionItem.py b/product/ERP5/Document/SubscriptionItem.py index dc42088c24..5dcdd66d2e 100644 --- a/product/ERP5/Document/SubscriptionItem.py +++ b/product/ERP5/Document/SubscriptionItem.py @@ -39,7 +39,6 @@ from Products.ERP5.mixin.rule import MovementGeneratorMixin from Products.ERP5.mixin.periodicity import PeriodicityMixin from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod from Products.ERP5Type.Base import Base -from DateTime import DateTime from zLOG import LOG @@ -292,7 +291,6 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, Periodici price_currency = movement.getPriceCurrency() specialise = movement.getSpecialise() - now = DateTime() current_date = start_date id_index = 0 while current_date < stop_date: @@ -315,11 +313,9 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, Periodici specialise=specialise, ) result.append(generated_movement) - if current_date > now: - # generate only one movement in advance from today - break current_date = next_date id_index += 1 + break return result -- 2.30.9