Commit 5ac66463 authored by Łukasz Nowak's avatar Łukasz Nowak

Revert "Drop periodicity, as it does not support exact month additions."

This reverts commit 1ec72363.
parent 18a5b6c9
...@@ -39,7 +39,6 @@ from Products.ERP5.mixin.rule import MovementGeneratorMixin ...@@ -39,7 +39,6 @@ from Products.ERP5.mixin.rule import MovementGeneratorMixin
from Products.ERP5.mixin.periodicity import PeriodicityMixin from Products.ERP5.mixin.periodicity import PeriodicityMixin
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from Products.ERP5Type.Base import Base from Products.ERP5Type.Base import Base
from Products.ERP5Type.DateUtils import getNumberOfDayInMonth
from zLOG import LOG from zLOG import LOG
...@@ -303,9 +302,7 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, Periodici ...@@ -303,9 +302,7 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, Periodici
current_date = start_date current_date = start_date
id_index = 0 id_index = 0
while current_date < stop_date: while current_date < stop_date:
# XXX-Luke: Periodicty usage was dropped as real month additions shall next_date = self.getNextPeriodicalDate(current_date)
# be supported, when periodicity floors result to given period precision
next_date = current_date + getNumberOfDayInMonth(current_date)
if next_date > stop_date: if next_date > stop_date:
next_date = stop_date next_date = stop_date
generated_movement = newTempMovement(self, 'subscription_%s' % id_index) generated_movement = newTempMovement(self, 'subscription_%s' % id_index)
......
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