31 lines
1.4 KiB
Plaintext
31 lines
1.4 KiB
Plaintext
|
Index: addons/openacademy/views/openacademy.xml
|
||
|
===================================================================
|
||
|
--- addons.orig/openacademy/views/openacademy.xml 2014-08-28 14:34:19.255004611 +0200
|
||
|
+++ addons/openacademy/views/openacademy.xml 2014-08-28 14:34:19.251004612 +0200
|
||
|
@@ -232,6 +232,12 @@
|
||
|
<field name="session_id"/>
|
||
|
<field name="attendee_ids"/>
|
||
|
</group>
|
||
|
+ <footer>
|
||
|
+ <button name="subscribe" type="object"
|
||
|
+ string="Subscribe" class="oe_highlight"/>
|
||
|
+ or
|
||
|
+ <button special="cancel" string="Cancel"/>
|
||
|
+ </footer>
|
||
|
</form>
|
||
|
</field>
|
||
|
</record>
|
||
|
Index: addons/openacademy/wizard.py
|
||
|
===================================================================
|
||
|
--- addons.orig/openacademy/wizard.py 2014-08-28 14:34:19.255004611 +0200
|
||
|
+++ addons/openacademy/wizard.py 2014-08-28 14:34:19.251004612 +0200
|
||
|
@@ -11,3 +11,8 @@
|
||
|
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 {}
|