Merge PR #571 into 12.0

Signed-off-by rafaelbn
pull/575/head
OCA-git-bot 2020-07-16 13:15:49 +00:00
commit 8aa4d64ea8
1 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,9 @@ from odoo import models
class MassMailing(models.Model): class MassMailing(models.Model):
_inherit = "mail.mass_mailing" _inherit = "mail.mass_mailing"
def send_mail(self): def get_remaining_recipients(self):
"""Sync dynamic lists before sending mailings to them.""" """When evaluating remaining recipients we must resync the list in
advance to avoid missing recipients due to domain change or new
partners fitting into the conditions"""
self.contact_list_ids.action_sync() self.contact_list_ids.action_sync()
return super().send_mail() return super().get_remaining_recipients()