agenda: don't include occurences from other months in list view
This commit is contained in:
parent
55e78c5324
commit
699ec9aa88
|
@ -134,11 +134,16 @@ class View(grok.View, utils.MonthlyView):
|
|||
|
||||
def getMonthEventsWithRepetition(self):
|
||||
events = self.getMonthEvents()
|
||||
year, month = self.getYearAndMonthToDisplay()
|
||||
for event in events[:]:
|
||||
if not event.multidays():
|
||||
continue
|
||||
if event.start.month != month:
|
||||
events.remove(event)
|
||||
repeated = event.end.toordinal()-event.start.toordinal()
|
||||
for i in range(repeated):
|
||||
if (event.start+datetime.timedelta(i+1)).month != month:
|
||||
continue
|
||||
# duplicate event with minimal infos
|
||||
new_event = event.__class__()
|
||||
new_event.id = event.id
|
||||
|
|
Reference in New Issue