Odoo Help

0

0
1 Answer
3
Avatar

Niyas Raphy

--Niyas Raphy--
24541
| 7 7 11
Wayanad, India
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to connect :  niyasraphyk@gmail.com

Twitter:https://twitter.com/niyasraphy
LinkedIn: https://www.linkedin.com/in/niyasraphy/
FB:https://www.facebook.com/niyasraphy123

Happy to help :)

Niyas Raphy
21/6/17 06:01

Hi Setsu,

You can check the below code to send the mail from the python,

template_obj = self.env['mail.mail']
template_data = {
'subject': 'Due Invoice Notification : ' + current_date,
'body_html': message_body,
'email_from': sender,
'email_to': ", ".join(recipients)
}
template_id = template_obj.create(template_data)
template_obj.send(template_id)

Also give the mail as depends in manifest file

Thanks

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform 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.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now