'Open a window to compose an email, pre-filled with the survey message'

@api.multi
def action_send_survey(self):

    if ((not self.page_ids) or (not [page.question_ids for page in self.page_ids if page.question_ids])):
        raise UserError(_('You    cannot    send    an    invitation    for    a    survey    that    has    no    questions.'))
    if self.stage_id.closed:
        raise UserError(_('You    cannot    send    invitations    for    closed    surveys.'))
    template = self.env.ref('survey.email_template_survey', raise_if_not_found=False)
    local_context = dict(self.env.context, default_model='survey.survey', default_res_id=self.id, default_survey_id=self.id, default_use_template=bool(template), default_template_id=((template and template.id) or False), default_composition_mode='comment')
    return {'type': 'ir.actions.act_window', 'view_type': 'form', 'view_mode': 'form', 'res_model': 'survey.mail.compose.message', 'target': 'new', 'context': local_context}
