[IMP] res_partner: change in _email_send method
bzr revid: kjo@tinyerp.com-20120221130857-l1s3ixwmwn7o12w5
This commit is contained in:
parent
fb6a2c7c4c
commit
33a5c3648d
|
@ -232,9 +232,8 @@ class res_partner(osv.osv):
|
|||
def _email_send(self, cr, uid, ids, email_from, subject, body, on_error=None):
|
||||
partners = self.browse(cr, uid, ids)
|
||||
for partner in partners:
|
||||
if len(partner.address):
|
||||
if partner.address[0].email:
|
||||
tools.email_send(email_from, [partner.address[0].email], subject, body, on_error)
|
||||
if partner.email:
|
||||
tools.email_send(email_from, [partner.email], subject, body, on_error)
|
||||
return True
|
||||
|
||||
def email_send(self, cr, uid, ids, email_from, subject, body, on_error=''):
|
||||
|
|
Loading…
Reference in New Issue