Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Hello willie ho,
If you want to send a static mail, can be directly sent by below steps:
def send_mail(self, cr, uid, context=None):
mail_body="""you can write any html tags and text here"""
mail = self.pool.get('mail.mail').create(cr, uid, mail_vals, context=context)
self.pool.get('mail.mail').send(cr, uid, [mail], context=context)
After creating a scheduler method you have to create a scheduler xml record:
<record forcecreate="True" id="ir_cron_scheduler_action" model="ir.cron">
<field eval="True" name="active"/>
<field name="user_id" ref="base.user_root"/>
<field eval="False" name="doall"/>
<field eval="'model.model'" name="model"/><!--model in which method of scheduler is defined -->
<field eval="'send_mail'" name="function"/>
<field eval="'(True,)'" name="args"/>
Hope this helps.
Let me know if you want to know solution for sending mail using template!
Thanks and Regards,
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 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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 8/19/15, 3:18 AM|
|Seen: 629 times|
|Last updated: 8/19/15, 9:32 AM|