depasser la verification du jours et heurs en cas de disponibilité total

This commit is contained in:
eloyoussef 2018-03-09 14:30:58 +01:00
parent 5163b7535c
commit b3705b95ef
1 changed files with 20 additions and 18 deletions

View File

@ -169,6 +169,8 @@ class GolemResourceReservation(models.Model):
'this period, please choose another périod before '
'confirming')
raise ValidationError(verr)
#check if the resource hasn't a total availibility
if not reservation.resource_id.availibility_24_7:
# Check if reservation is not taking place out the avaibility timetables
is_day_allowed = False
for timetable in reservation.resource_id.timetable_ids:
@ -203,7 +205,7 @@ class GolemResourceReservation(models.Model):
other_res.date_stop))
@api.multi
def reservation_calendar(self):
""" current resource reservation list """
""" current resource reservation calendar """
self.ensure_one()
calendar_view = {
'name': ('Resource Reservation list'),