hunk.code_window:         # Post the message
           new_message = MailMessage.create(values)
           # Post-process: subscribe author, update message_last_post
           # Note: the message_last_post mechanism is no longer used.  This
           # will be removed in a later version.
           if (self._context.get('mail_save_message_last_post') and
                   model and model != 'mail.thread' and self.ids and subtype_id):
               subtype_rec = self.env['mail.message.subtype'].sudo().browse(subtype_id)
               if not subtype_rec.internal:
                   # done with SUPERUSER_ID, because on some models users can post only with read access, not necessarily write access
                   self.sudo().write({'message_last_post': fields.Datetime.now()})
           if author_id and model and self.ids and message_type != 'notification' and not self._context.get('mail_create_nosubscribe'):
               self.message_subscribe([author_id], force=False)
           self._message_post_after_hook(new_message)
  
hunk.labels: keep keep keep replace replace replace replace replace replace replace replace replace keep keep keep keep
hunk.after_edit:         # Post-process: subscribe author
  
hunk.file_path: addons/mail/models/mail_thread.py
hunk.type: replace
file: Index: addons/openacademy/wizard.py
  ===================================================================
  --- addons.orig/openacademy/wizard.py	2014-08-28 14:34:07.879004780 +0200
  +++ addons/openacademy/wizard.py	2014-08-28 14:34:07.871004780 +0200
  @@ -5,6 +5,9 @@
   class Wizard(models.TransientModel):
       _name = 'openacademy.wizard'
   
  +    def _default_session(self):
  +        return self.env['openacademy.session'].browse(self._context.get('active_id'))
  +
       session_id = fields.Many2one('openacademy.session',
  -        string="Session", required=True)
  +        string="Session", required=True, default=_default_session)
       attendee_ids = fields.Many2many('res.partner', string="Attendees")
  Index: addons/openacademy/views/openacademy.xml
  ===================================================================
  --- addons.orig/openacademy/views/openacademy.xml	2014-08-28 14:34:07.879004780 +0200
  +++ addons/openacademy/views/openacademy.xml	2014-08-28 14:34:07.871004780 +0200
  @@ -223,4 +223,25 @@
                     parent="openacademy_menu"
                     action="session_list_action"/>
   
  +        <record model="ir.ui.view" id="wizard_form_view">
  +            <field name="name">wizard.form</field>
  +            <field name="model">openacademy.wizard</field>
  +            <field name="arch" type="xml">
  +                <form string="Add Attendees">
  +                    <group>
  +                        <field name="session_id"/>
  +                        <field name="attendee_ids"/>
  +                    </group>
  +                </form>
  +            </field>
  +        </record>
  +
  +        <act_window id="launch_session_wizard"
  +                    name="Add Attendees"
  +                    src_model="openacademy.session"
  +                    res_model="openacademy.wizard"
  +                    view_mode="form"
  +                    target="new"
  +                    key2="client_action_multi"/>
  +
   </odoo>
  