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

Hello Odoo Community,

I am looking for a solution to automatically generate and send mail merge letters in Odoo for contracts that are about to expire, specifically 3 months before their end date. Although I've explored some of Odoo's features, I'm not entirely sure how to set this up effectively.

Here are the specifics of my scenario:


  • Contract Management: We use Odoo to manage our contracts, each with a defined start and end date.
  • Notifications: We want to automatically send a reminder mail merge letter (via email or physical mail) to our customers 3 months before their contract expires. This is to remind them about the upcoming expiration and to discuss any renewal options.
  • Customization: Each mail merge letter should include personalized details specific to each contract, such as the customer’s name, contract details, and our company's contact information.


My questions are:


  1. Automation: How can I configure Odoo to automatically generate and send these mail merge letters when a contract is nearing its end (3 months prior)?
  2. Templates: Is there a way to create templates for these letters that can dynamically pull in data from the contract fields?
  3. Extending Standard Features: If Odoo doesn’t provide a direct solution for this scenario, what modules or customizations would be necessary to implement this?
  4. Practical Experiences: Has anyone dealt with a similar use case and can share their insights or best practices?


Here are some of my thoughts and initial research:

  • I considered using the Automated Actions feature in Odoo to set up a trigger for sending out these letters.
  • While I'm familiar with Email Templates in Odoo, I'm uncertain how to apply them to contracts and whether they can be used for physical mail.
  • Custom modules or Odoo Studio might be useful, but I’m unsure about the best approach to take here.

Any help or guidance on how to efficiently achieve this would be greatly appreciated!

Thank you in advance for your support.

Best regards,

Dominik

Avatar
Discard

It seems there is a ready universal solution for your purposes: https://apps.odoo.com/apps/modules/17.0/total_notify. This app makes Odoo automatically and regularly generate and send the table of any Odoo records filtered by particular criteria and relative dates. The data to show (so, columns,
'customer’s name, contract details, and our company's contact information' from your requirements) are also easily configurable.

I just edited my answer below.

Best Answer

Hello,

quick question: Your contracts with the customers are managed through the Subscription app or do you have a custom app developped?


Edit:


No need for a custom App, you allready have everything you need in Odoo. This is how I would go about it:


1- Using Studio, create a new Report in the Subscription App (a Report is what pdf files are called in Odoo). You can easily pull fields from your Subscription app and add them to the pdf. 

For a guide on how to create and customize reports, watch this video:

https://www.youtube.com/watch?v=iFghjU_hWMQ&t=60s


2- Create your email template. Head into Settings --> Technical --> Email Templates and create a new one.

In the "Applies To" field, select Subscriptions (i do not have the Subscription App but i will show you a similar thing with Sales Order).

In the body of the email, if you need to pull a field from the Subcription App, just type "/" and select Dynamic Placeholder. and then choose the appropriate field. For example (below), let's say you want to show the customer name, you would do the following: 

/ --> Dynamic Field --> Customer --> Name --> Press Enter , then Odoo will automatically convert your choice into the proper "field name" for the email template. Like so


If you want to attach the PDF Report you create, head over to the Settings tabs, and then in Dynamic Reports field, choose the report you created.


Also, do not forget to set the To (recipients) field in the Email Configuration tabs to "{{ object.partner_id.id }}" (without the "" "") so that it sends it to the actual client for whom the subscription is ending in 3 months.


3- Create an automation that run daily to check the end date of all your subscription and that send the email template when it finds one that expires in 3 months before the end date of the subscription that will send the email template you just created. This you will need someone else to help you with as I honestly do not know how to code it. I am just here to help you with the logic of the process.


Regarding of whether you could have Odoo send the physical mail, there are a few options:

1- You could get to that is either have the email template CCed to someone in your office who will have to actually print or mail it (cheaper option). 

2- You could use a service that offers emails to physical mail, like https://click2mail.com/email-to-mail . Basically you email them the letters you want to send and they physically print and mail them (you will need to create a separate email template as per their instructions i imagine).

3- You could have a partner developp a module for you that connects your Odoo to one of the many "We send physical mail for you" Apis.


P.S: https://docupost.com/ has a Zappier integration that could be a potential solution to your physical email thing.


 

Hope this helps.

Avatar
Discard
Author

Hi Fadi,

Contract details are mangaged with the subscription app - Odoo 17

Author Best Answer

Thank you, sir

Avatar
Discard
Related Posts Replies Views Activity
0
Feb 25
1107
1
Jun 23
2941
2
Dec 24
4644
1
Nov 23
3223
1
Feb 22
4535