add queue register function to member model
This commit is contained in:
parent
78687127f0
commit
321b25661a
@ -33,8 +33,8 @@ 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',
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="name">queue.tree</field>
|
||||
<field name="model">golem.activity.queue</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Queue Tree" editable="top">
|
||||
<tree string="Queue Tree" editable="bottom">
|
||||
<field name="activity_id"/>
|
||||
<field name="season_id"/>
|
||||
<field name="member_id"/>
|
||||
|
Loading…
Reference in New Issue
Block a user