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.

0

How to implement spool concept in odoo frame work

By
joshi
on 7/8/15, 1:23 AM 427 views

Hi, i have implemented email functionality for modules when event is triggered, right now am trying to push mails to mails pool , after that i need to send mails from spool , is there any concept of pushing mails to spool in odoo framework ??, can any one tell me where can i find it 

0

Axel Mendoza

--Axel Mendoza--
10238
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 7/10/15, 2:38 AM

You can create mail.message without sending, also you could marked with some field as a tag, then using a cron action you could send those emails in a disconected way using your conditions, etc

HI Axel Thanks for response, i got this by mail_values={ 'email_from': employeeEmail, 'email_to': employeeEmail, 'subject': 'Leave Status', 'body_html': 'HI %s'% employeeName +'


Leave Type: %s' % statusName + '


No.of days: %s'%record.number_of_days_temp+'


The status of the leave you''ve applied for the period %s'% record.date_from+'TO %s' %record.date_to +'has been changed to %s'% record.state , 'auto_delete': True, 'type': 'email', } mail_obj = self.pool.get('mail.mail') msg_id = mail_obj.create(cr, uid,mail_values, context=context) msg_obj = self.pool.get('mail.message') msg_obj.create(cr, uid, mail_values)

joshi
on 7/10/15, 4:43 AM

You do not need the mail.mail create just the message, then create a cron definition to check for those messages not delivered and use a mail.mail create with values {'mail_message_id': mail_message_id} and call the method send on mail.mail to deliver the mail.message

Axel Mendoza
on 7/10/15, 5:29 AM
0
joshi
On 7/10/15, 4:45 AM

HI Axel Thanks for response,

i got this by

mail_values={

'email_from': employeeEmail,

'email_to': employeeEmail,

'subject': 'Leave Status',

'body_html': 'HI %s'% employeeName +'

Leave Type: %s' % statusName + '

No.of days: %s'%record.number_of_days_temp+'

The status of the leave you''ve applied for the period %s'% record.date_from+'TO %s' %record.date_to +'has been changed to %s'% record.state , 'auto_delete': True, 'type': 'email', }

mail_obj = self.pool.get('mail.mail')

msg_id = mail_obj.create(cr, uid,mail_values, context=context)

msg_obj = self.pool.get('mail.message')

msg_obj.create(cr, uid, mail_values)

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

2 follower(s)

Stats

Asked: 7/8/15, 1:23 AM
Seen: 427 times
Last updated: 10/17/15, 4:46 AM