From c9a4cc5950d50dc7aabd8c131dbb03f81446743c Mon Sep 17 00:00:00 2001 From: eloyoussef Date: Mon, 26 Feb 2018 13:42:48 +0100 Subject: [PATCH] =?UTF-8?q?cacher=20onglet=20d'attente=20et=20rendre=20en?= =?UTF-8?q?=20lecture=20seule=20traitement=20automatis=C3=A9=20au=20cas=20?= =?UTF-8?q?d'attente=20non=20permis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- golem_activity_queue/models/golem_activity.py | 8 +++++++- golem_activity_queue/views/golem_activity_views.xml | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/golem_activity_queue/models/golem_activity.py b/golem_activity_queue/models/golem_activity.py index 7ef61f2..752d9d4 100644 --- a/golem_activity_queue/models/golem_activity.py +++ b/golem_activity_queue/models/golem_activity.py @@ -40,7 +40,13 @@ class GolemActivity(models.Model): @api.multi def queue_allowed_toggle(self): for activity in self: - activity.queue_allowed = not activity.queue_allowed + if activity.queue_allowed: + activity.queue_allowed = not activity.queue_allowed + activity.automated_registration_from_queue = False + else: + activity.queue_allowed = not activity.queue_allowed + + #contraint sur nombre d'inscription : une desincription declanche une inscription depuis attente @api.multi diff --git a/golem_activity_queue/views/golem_activity_views.xml b/golem_activity_queue/views/golem_activity_views.xml index 8dcd8e5..e1a1998 100644 --- a/golem_activity_queue/views/golem_activity_views.xml +++ b/golem_activity_queue/views/golem_activity_views.xml @@ -28,7 +28,7 @@ along with this program. If not, see . - + @@ -41,7 +41,7 @@ along with this program. If not, see . - +