web/views/calendar.py
branchtls-sprint
changeset 1800 05c36cf3c813
parent 1799 183acfaa3cde
child 1801 672acc730ce5
equal deleted inserted replaced
1799:183acfaa3cde 1800:05c36cf3c813
   162             if len(self.rset[row]) > 1 and self.rset.description[row][1] == 'CWUser':
   162             if len(self.rset[row]) > 1 and self.rset.description[row][1] == 'CWUser':
   163                 user = self.rset.get_entity(row, 1)
   163                 user = self.rset.get_entity(row, 1)
   164             else:
   164             else:
   165                 user = None
   165                 user = None
   166             the_dates = []
   166             the_dates = []
   167             tstart = todate(task.start)
   167             tstart = task.start
   168             if tstart:
   168             if tstart:
       
   169                 tstart = todate(task.start)
   169                 if tstart > lastday:
   170                 if tstart > lastday:
   170                     continue
   171                     continue
   171                 the_dates = [tstart]
   172                 the_dates = [tstart]
   172             tstop = todate(task.start)
   173             tstop = task.stop
   173             if tstop:
   174             if tstop:
       
   175                 tstop = todate(tstop)
   174                 if tstop < firstday:
   176                 if tstop < firstday:
   175                     continue
   177                     continue
   176                 the_dates = [tstop]
   178                 the_dates = [tstop]
   177             if tstart and tstop:
   179             if tstart and tstop:
   178                 if tstart.isocalendar() == tstop.isocalendar():
   180                 if tstart.isocalendar() == tstop.isocalendar():
   346             task = self.rset.get_entity(row, 0)
   348             task = self.rset.get_entity(row, 0)
   347             if task in done_tasks:
   349             if task in done_tasks:
   348                 continue
   350                 continue
   349             done_tasks.append(task)
   351             done_tasks.append(task)
   350             the_dates = []
   352             the_dates = []
   351             tstart = todate(task.start)
   353             tstart = task.start
   352             tstop = todate(task.stop)
   354             tstop = task.stop
   353             if tstart:
   355             if tstart:
       
   356                 tstart = todate(tstart)
   354                 if tstart > lastday:
   357                 if tstart > lastday:
   355                     continue
   358                     continue
   356                 the_dates = [tstart]
   359                 the_dates = [tstart]
   357             if tstop:
   360             if tstop:
       
   361                 tstop = todate(tstop)
   358                 if tstop < firstday:
   362                 if tstop < firstday:
   359                     continue
   363                     continue
   360                 the_dates = [tstop]
   364                 the_dates = [tstop]
   361             if tstart and tstop:
   365             if tstart and tstop:
   362                 the_dates = date_range(max(tstart, firstday),
   366                 the_dates = date_range(max(tstart, firstday),