diff --git a/golem_activity_queue/models/golem_activity.py b/golem_activity_queue/models/golem_activity.py
index 752d9d4..0c91550 100644
--- a/golem_activity_queue/models/golem_activity.py
+++ b/golem_activity_queue/models/golem_activity.py
@@ -35,7 +35,16 @@ class GolemActivity(models.Model):
queue_activity_number = fields.Integer(compute="_queue_activity_number",
store=True, string='Pending registration number')
-
+ #mettre à jour le status d'activité remplis sur chaque attente
+ @api.constrains('places_remain')
+ def updateActivityState(self):
+ """updates queue.is_activity_full based on places_remain"""
+ for activity in self:
+ for queue in self.activity_queue_ids:
+ if activity.places_remain == 0:
+ queue.is_activity_full = "Full activity"
+ else:
+ queue.is_activity_full = "Not full activity"
#Ajouter/supprimer une file à l'activité et afficher popup pour traitement automatisé
@api.multi
def queue_allowed_toggle(self):
diff --git a/golem_activity_queue/models/golem_activity_queue.py b/golem_activity_queue/models/golem_activity_queue.py
index bdadb04..bddf1e0 100644
--- a/golem_activity_queue/models/golem_activity_queue.py
+++ b/golem_activity_queue/models/golem_activity_queue.py
@@ -37,14 +37,15 @@ class GolemActivityQueue(models.Model):
#nombre de place disponible sur activité liée
places_remain = fields.Integer(related='activity_id.places_remain')
#activité liée est plein ou non
- is_activity_full = fields.Char(compute="_isActivityFull")
+ is_activity_full = fields.Char(compute="_isActivityFull", store=True)
sequence = fields.Integer()
+
# decider si l'activity liée est pleine ou non : pour group by sur la liste
- @api.multi
@api.depends('places_remain')
def _isActivityFull(self):
+ print "_____________________________________lklkkaaaa"
for record in self:
if record.places_remain == 0:
record.is_activity_full = "Full activity"
diff --git a/golem_activity_queue/views/golem_activity_queue_views.xml b/golem_activity_queue/views/golem_activity_queue_views.xml
index 44564c7..5f38882 100644
--- a/golem_activity_queue/views/golem_activity_queue_views.xml
+++ b/golem_activity_queue/views/golem_activity_queue_views.xml
@@ -45,7 +45,10 @@ along with this program. If not, see .
-
+
+
+
@@ -62,12 +65,12 @@ along with this program. If not, see .
queue.treegolem.activity.queue
-
-
-
+
diff --git a/golem_activity_queue/views/golem_member_views.xml b/golem_activity_queue/views/golem_member_views.xml
index cd606a9..faf7a43 100644
--- a/golem_activity_queue/views/golem_member_views.xml
+++ b/golem_activity_queue/views/golem_member_views.xml
@@ -38,17 +38,16 @@ along with this program. If not, see .
+ context="{'default_member_id': active_id}">
-
+
-
-
-