diff --git a/golem_activity_queue/models/golem_activity.py b/golem_activity_queue/models/golem_activity.py
index cf35b4e..53343ee 100644
--- a/golem_activity_queue/models/golem_activity.py
+++ b/golem_activity_queue/models/golem_activity.py
@@ -33,13 +33,13 @@ class GolemActivity(models.Model):
'name' : _('Register in the queue'),
'type' : 'ir.actions.act_window',
'res_model' : 'golem.activity.queue',
- 'view_mode': 'form',
- 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'flags': {'action_buttons': True},
'target': 'new',
}
@api.onchange('activity_registration_ids')
- def _checkRemain(self):
+ def _checkRemain(self):
if len(self.activity_registration_ids) > self.places and self.queue_allowed:
return {
'warning' : {
diff --git a/golem_activity_queue/models/golem_member.py b/golem_activity_queue/models/golem_member.py
index fd98685..7b22394 100644
--- a/golem_activity_queue/models/golem_member.py
+++ b/golem_activity_queue/models/golem_member.py
@@ -31,3 +31,13 @@ class GolemMember(models.Model):
'message': _('No remaining place, please register in the queue'),
}
}
+
+ def queue_register(self):
+ return {
+ 'name' : _('Register in the queue'),
+ 'type' : 'ir.actions.act_window',
+ 'res_model' : 'golem.activity.queue',
+ 'view_mode': 'tree',
+ 'flags': {'action_buttons': True},
+ 'target': 'new',
+ }
diff --git a/golem_activity_queue/views/golem_activity_queue_views.xml b/golem_activity_queue/views/golem_activity_queue_views.xml
index a2cff8b..3522e0a 100644
--- a/golem_activity_queue/views/golem_activity_queue_views.xml
+++ b/golem_activity_queue/views/golem_activity_queue_views.xml
@@ -43,7 +43,7 @@ along with this program. If not, see .
queue.tree
golem.activity.queue
-
+