From 5ac6646359c0728e55a921b89261839462ddb72c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Tue, 13 Mar 2012 17:01:33 +0100 Subject: [PATCH] Revert "Drop periodicity, as it does not support exact month additions." This reverts commit 1ec72363ff06f97ff7cec932c7902dec40608f63. --- product/ERP5/Document/SubscriptionItem.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/product/ERP5/Document/SubscriptionItem.py b/product/ERP5/Document/SubscriptionItem.py index be40bb75d7..fd74b8a8b1 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 Products.ERP5Type.DateUtils import getNumberOfDayInMonth from zLOG import LOG @@ -303,9 +302,7 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, Periodici current_date = start_date id_index = 0 while current_date < stop_date: - # XXX-Luke: Periodicty usage was dropped as real month additions shall - # be supported, when periodicity floors result to given period precision - next_date = current_date + getNumberOfDayInMonth(current_date) + next_date = self.getNextPeriodicalDate(current_date) if next_date > stop_date: next_date = stop_date generated_movement = newTempMovement(self, 'subscription_%s' % id_index) -- 2.30.9