[FIX]GOLEM Resource : reservation can end at the same time new begin
This commit is contained in:
parent
518d2c8348
commit
05d5cc5cda
@ -190,8 +190,8 @@ class GolemResourceReservation(models.Model):
|
|||||||
('id', '!=', reservation.id)]
|
('id', '!=', reservation.id)]
|
||||||
reservations = self.env['golem.resource.reservation'].search(domain)
|
reservations = self.env['golem.resource.reservation'].search(domain)
|
||||||
for other_res in reservations:
|
for other_res in reservations:
|
||||||
if (other_res.hour_start <= reservation.hour_start <= other_res.hour_stop) or \
|
if (other_res.hour_start < reservation.hour_start < other_res.hour_stop) or \
|
||||||
(other_res.hour_start <= reservation.hour_stop <= other_res.hour_stop):
|
(other_res.hour_start < reservation.hour_stop < other_res.hour_stop):
|
||||||
uerr = _('Not allowed, the resource is already taken '
|
uerr = _('Not allowed, the resource is already taken '
|
||||||
'during this period : from {} to {} this day, '
|
'during this period : from {} to {} this day, '
|
||||||
'please choose another périod before confirming.')
|
'please choose another périod before confirming.')
|
||||||
|
Loading…
Reference in New Issue
Block a user