forked from Yaltik/golem
depasser la verification du jours et heurs en cas de disponibilité total
This commit is contained in:
parent
5163b7535c
commit
b3705b95ef
@ -169,6 +169,8 @@ class GolemResourceReservation(models.Model):
|
|||||||
'this period, please choose another périod before '
|
'this period, please choose another périod before '
|
||||||
'confirming')
|
'confirming')
|
||||||
raise ValidationError(verr)
|
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
|
# Check if reservation is not taking place out the avaibility timetables
|
||||||
is_day_allowed = False
|
is_day_allowed = False
|
||||||
for timetable in reservation.resource_id.timetable_ids:
|
for timetable in reservation.resource_id.timetable_ids:
|
||||||
@ -203,7 +205,7 @@ class GolemResourceReservation(models.Model):
|
|||||||
other_res.date_stop))
|
other_res.date_stop))
|
||||||
@api.multi
|
@api.multi
|
||||||
def reservation_calendar(self):
|
def reservation_calendar(self):
|
||||||
""" current resource reservation list """
|
""" current resource reservation calendar """
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
calendar_view = {
|
calendar_view = {
|
||||||
'name': ('Resource Reservation list'),
|
'name': ('Resource Reservation list'),
|
||||||
|
Loading…
Reference in New Issue
Block a user