Skip to Content
Menu
This question has been flagged
2 Replies
4046 Views

Hi everyone,

I meet a problem when I was trying to setup CRM system. I want to make a function like

1.Sales team will create a sale order and according to expiration date mail should go to the customer mail id mentioned before two months of expiration date.

2.Expiration date is 20/07/2017 renewal notification should go on 20-05-2017 or each one moth or 15 days it should go.

Please help to tell me how to make it. Thanks a lot!

Avatar
Discard
Best Answer

Hi,

For this you can create an automated action and then you can check the expiration date in the python function you can check the date and expiration date, and can notify using the email.

To create scheduled action you can check this link, https://www.odoo.yenthevg.com/creating-automated-actions-in-odoo/

and to send email you can refer this,

template_obj = self.env['mail.mail']
template_data = {
'subject': 'Test notification',
'body_html': 'add message body here',
'email_from': sender,
'email_to': self.email
}
template_id = template_obj.create(template_data)
template_obj.send(template_id)


Thanks

Avatar
Discard
Best Answer

For expiry of draft quotation, you can as well add a "codeless" automated action as per attached image. Activate the developer mode in Settings > Go to Settings > Technical > Automated action > and create one.

Or if you use Odoo Studio (in Enterprise version), you can do as foolows https://youtu.be/85bFjYRB67g

Avatar
Discard