[FIX] base, massmail wizard: we don't want to consider the child companies but only the contacts

bzr revid: qdp-launchpad@openerp.com-20120316135941-8n4uttx2nrlwoqqk
This commit is contained in:
Quentin (OpenERP)
2012-03-16 14:59:41 +01:00
parent 629d662f63
commit 2671b0ee91
@@ -61,6 +61,9 @@ class partner_massmail_wizard(osv.osv_memory):
emails_seen = set()
for partner in partners:
for adr in partner.child_ids:
if adr.is_company:
#we don't want to consider child companies but only the contacts
continue
if adr.email and not adr.email in emails_seen:
try:
emails_seen.add(adr.email)