forked from Yaltik/golem
enlvemenet de l'inscription en attente depuis membre sur 2 étapes
This commit is contained in:
parent
c9a4cc5950
commit
c4f01dee5e
@ -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',
|
||||
|
@ -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})
|
||||
|
@ -28,7 +28,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<form string="Rejection reason">
|
||||
<group>
|
||||
<field name="member_id" invisible="1" />
|
||||
<field name="activity_id" options="{'no_create': True}" />
|
||||
<field name="activity_id"
|
||||
domain="[('places_remain','<' , 1), ('queue_allowed', '=', True), ('is_current', '=', True)]"
|
||||
options="{'no_create': True}" />
|
||||
</group>
|
||||
<footer>
|
||||
<button name="register_in_queue" string="Validate" type="object"
|
||||
|
Loading…
Reference in New Issue
Block a user