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.

20 lines
657 B

  1. # -*- coding: utf-8 -*-
  2. # © 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from openerp import api, fields, models
  5. class MailMailStatistics(models.Model):
  6. _inherit = 'mail.mail.statistics'
  7. mass_mailing_sending_id = fields.Many2one(
  8. comodel_name='mail.mass_mailing.sending',
  9. string="Mass mailing sending", readonly=True)
  10. @api.model
  11. def create(self, vals):
  12. res = super(MailMailStatistics, self).create(vals)
  13. res.mass_mailing_sending_id = \
  14. self.env.context.get('mass_mailing_sending_id', False)
  15. return res