You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
510 B

  1. from odoo import api, fields, models
  2. class MailComposeMessage(models.TransientModel):
  3. _inherit = 'mail.compose.message'
  4. @api.multi
  5. def get_mail_values(self, res_ids):
  6. """Generate the values that will be used by send_mail to create mail_messages
  7. or mail_mails. """
  8. results = super(MailComposeMessage, self).get_mail_values(res_ids)
  9. for res_id in res_ids:
  10. results[res_id]['mail_activity_type_id'] = self.mail_activity_type_id.id
  11. return results