Skip to content
Snippets Groups Projects
Commit e8bced74 authored by Benjamin - Le Filament's avatar Benjamin - Le Filament
Browse files

[cgscop #172] optimisation condition

parent 3f89b56f
Branches
No related tags found
No related merge requests found
...@@ -117,17 +117,8 @@ class CGScopCalendar(models.Model): ...@@ -117,17 +117,8 @@ class CGScopCalendar(models.Model):
# Récupère les entrées en intersection # Récupère les entrées en intersection
# avec la plage horaire # avec la plage horaire
entries = self.search([ entries = self.search([
'|',
'|',
'&',
('start', '>', event.start),
('start', '<', event.stop), ('start', '<', event.stop),
'&',
('stop', '>', event.start), ('stop', '>', event.start),
('stop', '<', event.stop),
'&',
('start', '<=', event.start),
('stop', '>=', event.stop),
('user_id', '=', self.env.uid), ('user_id', '=', self.env.uid),
('project_id', '=', event.project_id.id), ('project_id', '=', event.project_id.id),
('id', '!=', event.id) ('id', '!=', event.id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment