Commit 219e01d9 authored by Romain Courteaud's avatar Romain Courteaud

Only rely on periodicity to set dates.

This will prevent creating compensation movement if stop date of the open order
line is increased.
parent 5ac66463
...@@ -303,8 +303,6 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, Periodici ...@@ -303,8 +303,6 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, Periodici
id_index = 0 id_index = 0
while current_date < stop_date: while current_date < stop_date:
next_date = self.getNextPeriodicalDate(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) generated_movement = newTempMovement(self, 'subscription_%s' % id_index)
generated_movement._edit( aggregate_value=self, generated_movement._edit( aggregate_value=self,
resource=resource, resource=resource,
......
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