diff --git a/golem_activity_queue/models/golem_member.py b/golem_activity_queue/models/golem_member.py
index 5902b48..3fab52c 100644
--- a/golem_activity_queue/models/golem_member.py
+++ b/golem_activity_queue/models/golem_member.py
@@ -53,6 +53,7 @@ class GolemMember(models.Model):
print self
self.ensure_one()
member_id = self[0]
+
return {
'name' : _('Choose the activity to register in'),
'type' : 'ir.actions.act_window',
diff --git a/golem_activity_queue/wizard/golem_activity_queue_choose.py b/golem_activity_queue/wizard/golem_activity_queue_choose.py
index 0490bf9..0c6280e 100644
--- a/golem_activity_queue/wizard/golem_activity_queue_choose.py
+++ b/golem_activity_queue/wizard/golem_activity_queue_choose.py
@@ -24,25 +24,13 @@ class GolemActivityQueueChooseWizard(models.TransientModel):
"""GOLEM Resource wizard : rchoose activity queue to register in """
_name = "golem.activity.queue.choose.wizard"
- activity_id = fields.Many2one("golem.activity",
- domain=[('places_remain','<',1)])
+ activity_id = fields.Many2one("golem.activity")
member_id = fields.Many2one("golem.member")
-
-
# lancer liste editable d'inscription sur attente
def register_in_queue(self):
+ """ Choisir l'activité pour s'inscrire sur sa liste d'attente"""
self.ensure_one()
activityQueue = self[0]
- return {
- 'name' : _('Register in the queue'),
- 'type' : 'ir.actions.act_window',
- 'res_model' : 'golem.activity.queue',
- 'view_mode': 'tree',#
- 'context' :{'default_activity_id' : activityQueue.activity_id.id,
- 'default_member_id' : activityQueue.member_id.id
- },
- 'domain' : [('activity_id', '=',activityQueue.activity_id.id )],
- 'flags': {'action_buttons': True},
- 'target': 'new',
- }
+ self.env['golem.activity.queue'].create({'member_id': activityQueue.member_id.id,
+ 'activity_id': activityQueue.activity_id.id})
diff --git a/golem_activity_queue/wizard/golem_activity_queue_choose_views.xml b/golem_activity_queue/wizard/golem_activity_queue_choose_views.xml
index de5b85f..cc22706 100644
--- a/golem_activity_queue/wizard/golem_activity_queue_choose_views.xml
+++ b/golem_activity_queue/wizard/golem_activity_queue_choose_views.xml
@@ -28,7 +28,9 @@ along with this program. If not, see