Openerp schedule server action

In OpenERP 6.0.1, I created an action with the server to send an email confirmation after confirming the account and associate it accordingly with the account workflow. Now, when the invoice is confirmed, an email is automatically sent.
is there any way to set a date when you need to send an email instead of sending it immediately? how to "send an email after one week of confirmation"?

+4
source share
3 answers

There is one ir.cron object that will work for a certain period of time. There you can specify the time when you want to send an email.

This object will call the function specified in the Method attribute. In this function, you should look for those invoices that are in the created state. Then check the date when it was created, and if its> = 7 days, then send mail.

Or

You can create ir.cron for a specific invoice workflow action that will have a Next Execution Date , like after 7 or 8 days.

+8
source

I do not know, but I think that you can also use the planned actions in administration-> shedular-> sheduled, otherwise ir.cron is the best option for sending outgoing emails

0
source

With OpenERO 6.1, the new email engine has an email queue, so you just need to do this in the email queue in this email queue, and we already have one scheduled action that processes this email queue at a certain interval, so what you can do is change the launch time of the same action. and you can see Engine api emails in order to queue your emails in the email queue.

respectfully

0
source

Source: https://habr.com/ru/post/1402003/


All Articles