[FIX] Don't send mail to opt-outed contacts in mass mailing

This commit is contained in:
Julien De Coster 2015-05-11 11:47:00 +02:00
parent 9d2dbda8ca
commit 2d260b78d8
1 changed files with 1 additions and 1 deletions

View File

@ -513,7 +513,7 @@ class MassMailing(osv.Model):
elif len(item) == 3:
mailing_list_ids |= set(item[2])
if mailing_list_ids:
value['mailing_domain'] = "[('list_id', 'in', %s)]" % list(mailing_list_ids)
value['mailing_domain'] = "[('list_id', 'in', %s), ('opt_out', '=', False)]" % list(mailing_list_ids)
else:
value['mailing_domain'] = "[('list_id', '=', False)]"
else: