View for wizard is used to show the value in current database, add buttons to the wizard and implement the corresponding method for adding the attendees to the given session.
For example you can see below code.
<field name="attendee_ids">
<footer>
<button name="subscribe" type="object" string="Subscribe" class="oe_highlight">
or
</button><button special="cancel" string="Cancel">
</button></footer>
</field>
openacademy/wizard.py
session_id = fields.Many2one('openacademy.session',
string="Session", required=True, default=_default_session)
attendee_ids = fields.Many2many('res.partner', string="Attendees")
@api.multi
def subscribe(self):
self.session_id.attendee_ids |= self.attendee_ids
return {}
Note-Modify the wizard model so that attendees can be registered to multiple sessions.
0 Comment(s)