Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

How to send invoice mail automatically?

By
Anna Ostapenko
on 7/16/13, 8:07 AM 2,436 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!

2

Marc Cassuto

--Marc Cassuto--
815
| 4 4 8
Montreal, Canada
--Marc Cassuto--


Marc Cassuto
On 8/22/13, 4:53 PM

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.

0

Marc Cassuto

--Marc Cassuto--
815
| 4 4 8
Montreal, Canada
--Marc Cassuto--


Marc Cassuto
On 8/22/13, 1:31 PM

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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 7/16/13, 8:07 AM
Seen: 2436 times
Last updated: 3/16/15, 8:10 AM