Ajout d'un bouton d'inscription en attente depuis fiche membre onglet queue

This commit is contained in:
eloyoussef 2018-02-26 16:23:34 +01:00
parent c4f01dee5e
commit 7bf11db34a
2 changed files with 13 additions and 1 deletions

View File

@ -38,7 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<group>
<field name="activity_queue_ids"
context="{'default_member_id': active_id}">
context="{'default_member_id': active_id}" readonly="1">
<tree editable="top">
<field name="sequence" widget="handle"/>
<field name="activity_id" readonly="1" />
@ -46,6 +46,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</tree>
</field>
</group>
<group>
<button class="oe_highlight" name="choose_queue_to_register" string="Register in the queue" type="object"/>
</group>
</page>
</page>
</field>

View File

@ -34,3 +34,12 @@ class GolemActivityQueueChooseWizard(models.TransientModel):
activityQueue = self[0]
self.env['golem.activity.queue'].create({'member_id': activityQueue.member_id.id,
'activity_id': activityQueue.activity_id.id})
message = _('the member {} is registred in queue for the activity {} with success')
return {
'warning' : {
'title' : _('Warning'),
'message': (message.format(activityQueue.member_id.name,
activityQueue.activity_id.name))
}
}