Revision db33aecd
Added by Benjamin Dauvergne over 12 years ago
calebasse/agenda/appointments.py | ||
---|---|---|
32 | 32 |
self.weight = 0 |
33 | 33 |
self.act_type = None |
34 | 34 |
self.validation = None |
35 |
self.holiday = False |
|
35 | 36 |
self.__set_time(begin_time) |
36 | 37 |
|
37 | 38 |
def __set_time(self, time): |
... | ... | |
106 | 107 |
self.__set_time(begin_time) |
107 | 108 |
self.description = description |
108 | 109 |
|
110 |
def init_holiday_time(self, title, length, begin_time, description=None): |
|
111 |
self.init_busy_time(title, length, begin_time, description) |
|
112 |
self.holiday = True |
|
113 |
|
|
109 | 114 |
def init_start_stop(self, title, time): |
110 | 115 |
""" |
111 | 116 |
title: Arrivee ou Depart |
... | ... | |
147 | 152 |
delta_minutes = delta.seconds / 60 |
148 | 153 |
appointment = Appointment() |
149 | 154 |
label = u"Congé (%s)" % holiday.holiday_type.name |
150 |
appointment.init_busy_time(label,
|
|
155 |
appointment.init_holiday_time(label,
|
|
151 | 156 |
delta_minutes, |
152 | 157 |
time(interval.lower_bound.hour, interval.lower_bound.minute), |
153 | 158 |
description=holiday.comment) |
Also available in: Unified diff
agenda: do not show agenda containing only holidays (fix of previous implementation)