From 05d5cc5cda3f5c7014196678a6514a72dc7f94e6 Mon Sep 17 00:00:00 2001 From: Fabien BOURGEOIS Date: Sun, 18 Feb 2018 17:36:32 +0100 Subject: [PATCH] [FIX]GOLEM Resource : reservation can end at the same time new begin --- golem_resource/models/golem_resource_reservation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/golem_resource/models/golem_resource_reservation.py b/golem_resource/models/golem_resource_reservation.py index b1de33b..fe4a6a3 100644 --- a/golem_resource/models/golem_resource_reservation.py +++ b/golem_resource/models/golem_resource_reservation.py @@ -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.')