[FIX]GOLEM Resource : reservation can end at the same time new begin

This commit is contained in:
Fabien BOURGEOIS 2018-02-18 17:36:32 +01:00
parent 518d2c8348
commit 05d5cc5cda
1 changed files with 2 additions and 2 deletions

View File

@ -190,8 +190,8 @@ class GolemResourceReservation(models.Model):
('id', '!=', reservation.id)]
reservations = self.env['golem.resource.reservation'].search(domain)
for other_res in reservations:
if (other_res.hour_start <= reservation.hour_start <= other_res.hour_stop) or \
(other_res.hour_start <= reservation.hour_stop <= other_res.hour_stop):
if (other_res.hour_start < reservation.hour_start < other_res.hour_stop) or \
(other_res.hour_start < reservation.hour_stop < other_res.hour_stop):
uerr = _('Not allowed, the resource is already taken '
'during this period : from {} to {} this day, '
'please choose another périod before confirming.')