This question has been flagged
1 Reply
7646 Views

Hello everyone! I try to send email automatically by adding this Python code to Server action:

template_obj = self.pool.get('email.template') 
template_inst = template_obj.search(cr,uid,[('name','=','Invoice - Send by Email')])[0] 
action = template_obj.send_mail(cr,uid,template_inst,object.id,False,context)

The email has been created, based on template and with attachment of invoice, but the "send_to" field stays empty. So email stays in the folder Email->Emails. How can i solve this problem?

Thanks in advance!

Avatar
Discard
Best Answer

Hello,

historically, this feature was included but has been removed after a bug report.

The easiest way for you is to copy this code that was removed :

http://bazaar.launchpad.net/~openerp-dev/openobject-addons/7.0-fix-portal-emails-tde/revision/8925

Regards,

Marc

PS: please vote if you find this answer useful.

Avatar
Discard