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.

14 lines
414 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2017 Tecnativa - Jairo Llopis
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  4. from odoo import models
  5. class MassMailing(models.Model):
  6. _inherit = "mail.mass_mailing"
  7. def send_mail(self):
  8. """Sync dynamic lists before sending mailings to them."""
  9. self.contact_list_ids.action_sync()
  10. return super(MassMailing, self).send_mail()