Module Auto Reminder: Difference between revisions
m (Corrections categories, modele de page. Ajoute du bloc d'informations) Tag: 2017 source edit |
No edit summary Tag: 2017 source edit |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 13: | Line 13: | ||
|status=stable | |status=stable | ||
|prerequisites=Dolibarr 19 or higher | |prerequisites=Dolibarr 19 or higher | ||
|note=Tested on Dolibarr | |note=Tested on Dolibarr 24. Free module, GPLv3. | ||
}} | }} | ||
| Line 35: | Line 35: | ||
For each document, only the highest reminder level reached is considered. Lower levels that were missed are never sent afterwards: a document already overdue when the module is enabled receives a single reminder, the one matching its actual delay, with the right template. Never a burst of reminders over several days. | For each document, only the highest reminder level reached is considered. Lower levels that were missed are never sent afterwards: a document already overdue when the module is enabled receives a single reminder, the one matching its actual delay, with the right template. Never a burst of reminders over several days. | ||
== Semi-automatic mode (since 1.3.7) == | |||
Instead of sending a reminder, the module can prepare it and let you send it yourself. Each reminder due becomes an alert: | |||
* a bell in the top bar shows how many invoices and proposals are to be reminded, and leads to them; | |||
* the invoice and proposal lists get a ''Reminder'' column and a ''To remind'' filter; | |||
* the card of the document shows the alert with a ''Remind'' button, which opens the native Dolibarr send form, prefilled with the template of the level in the language of the customer, and with the recipients of the module. | |||
The alert closes when an email is sent from the card or scheduled with Doli Mail Later, when a higher level replaces it, or when you cancel it: only this level is then skipped. The mode is set per document type in the settings (''Semi-automatic mode by default''), and can be changed per third party and per document with the "Reminders" field. | |||
== Reminders per third party and per document (since 1.3.7) == | |||
The "Reminders" field is available on the third party card, the invoice card, the template invoice and the proposal card: | |||
* '''Automatic''': the reminder goes out on its own; | |||
* '''Semi-automatic''': the module prepares the reminder and flags it to you; | |||
* '''None''': the reminder is neither sent nor prepared as an alert, and an alert already open disappears. | |||
Left empty, the next level decides: the setting chosen on the invoice or the proposal takes precedence over that of the third party, which takes precedence over the module settings. Example: a third party in dispute is set to "None", one of its invoices to "Automatic": only that invoice is reminded. An invoice generated from a template invoice receives the setting of the template, which can then be changed on the invoice. | |||
The initial sending of documents is not affected by this field. It replaces the "Exclude from automatic reminders" checkbox of previous versions (see Installation for the upgrade). | |||
== Recipient of the emails == | == Recipient of the emails == | ||
| Line 48: | Line 68: | ||
Disabled contacts and contacts without email are never used. If no recipient is found, nothing is sent and an event is recorded in the document agenda. | Disabled contacts and contacts without email are never used. If no recipient is found, nothing is sent and an event is recorded in the document agenda. | ||
== Language of the emails (since 1.3.2) == | |||
An email goes out in the language of the third party, else in the default language of emails chosen in the module settings (since 1.3.7), else in the language of your Dolibarr. The module takes the first of these languages in which the email template exists, and sends the template of the settings as it is when none has it. The language fallback (es_MX to es_ES, then a template with no language) is the native Dolibarr one. Dates and amounts follow the language of the email sent. The attached PDF is not regenerated: it is the document as it stands. | |||
Example: in a French Dolibarr with English as default language of emails, a third party without language receives English, a French third party French, and a German third party English when there is no German template. | |||
Translating a template is done in Dolibarr itself, not in the module settings: create the template again with the SAME label, choose the language, then translate the subject and the content. Note that the language of third parties and templates only appears when the Dolibarr multi-language option is enabled. | |||
== Safety against mass sending == | == Safety against mass sending == | ||
| Line 53: | Line 81: | ||
Only documents validated after the sending option was enabled are sent: enabling the module on an existing database never sends the historical documents. The reference date is stored when you enable the option, displayed in the settings, and editable: you can move it back knowingly to include part of the history. An explicit warning is shown next to the field: any document validated on or after that date and never sent will be sent on the next job run. | Only documents validated after the sending option was enabled are sent: enabling the module on an existing database never sends the historical documents. The reference date is stored when you enable the option, displayed in the settings, and editable: you can move it back knowingly to include part of the history. An explicit warning is shown next to the field: any document validated on or after that date and never sent will be sent on the next job run. | ||
== | == When a document cannot be processed == | ||
When a document cannot be processed (no valid recipient, PDF not found, email template not found, send failure), the module records an event in the document agenda with the reason in plain words, once per document and per reason. Looking at the invoice or proposal, you immediately see why nothing was sent. | |||
== Multi-company (Multicompany) == | |||
== | The module works with the Multicompany module. Each entity sends and reminds '''its own documents only''', with its own settings, its own reminder levels and its own email templates. Sharing in Multicompany grants read visibility on the documents of another entity, it does not change their owner: a shared invoice is still reminded by the entity it belongs to. Nothing to configure. Before 1.3.3, an entity picked up the invoices and proposals of the entities it was allowed to see and processed them with its own settings. | ||
== Triggers for developers (since 1.3.5) == | |||
After each successful email, the module fires a trigger on the invoice or proposal, so that another module can react to it: <code>AUTOREMINDER_SEND</code> after the automatic sending of a validated document, <code>AUTOREMINDER_REMIND</code> after a reminder. The listener receives the document as <code>$object</code> and the details in <code>$object->context['autoreminder']</code>: <code>doctype</code>, <code>actioncomm_id</code> (the agenda event of this email), <code>level_id</code> and <code>level_days</code> (the reminder level, 0 and empty for the initial sending), <code>email_to</code>, <code>email_from</code>, <code>email_subject</code>. The module does not fire the core <code>BILL_SENTBYMAIL</code> and <code>PROPAL_SENTBYMAIL</code> triggers, which mean that a user sent the document from its card. | |||
= Installation = | = Installation = | ||
| Line 73: | Line 100: | ||
The module creates its database table, its extrafields and a daily scheduled job automatically. When upgrading from a 1.x version, existing reminder levels are kept as invoice levels. | The module creates its database table, its extrafields and a daily scheduled job automatically. When upgrading from a 1.x version, existing reminder levels are kept as invoice levels. | ||
After upgrading from 1.3.6 or an earlier version, disable then enable the module: the ticked "Exclude from automatic reminders" checkboxes become "None" in the "Reminders" field. Your settings and levels are kept. | |||
= Setup = | = Setup = | ||
| Line 78: | Line 107: | ||
Before configuring the module, create your email templates in ''Home - Setup - Emails - Email templates'': type ''Send invoice'' for invoices, type ''Send commercial proposal'' for proposals. One template for the initial sending, one per reminder level. | Before configuring the module, create your email templates in ''Home - Setup - Emails - Email templates'': type ''Send invoice'' for invoices, type ''Send commercial proposal'' for proposals. One template for the initial sending, one per reminder level. | ||
Then open the module settings. | Then open the module settings. At the top of the page, shared by both document types, the ''Default language of emails'' sets the language of the emails sent to third parties whose card has no language. Left empty, it is the language of your Dolibarr. | ||
Then there is one tab per document type (Invoices, Proposals), each with: | |||
* the automatic sending switch and its email template. When enabled, today's date is stored: only documents validated from that date on will be sent. The date is editable (with a warning), | * the automatic sending switch and its email template. When enabled, today's date is stored: only documents validated from that date on will be sent. The date is editable (with a warning), | ||
* the | * the reminders switch, the ''Semi-automatic mode by default'' option (and, for invoices only, the partially paid option), | ||
* the reminder levels table: delay in days + email template, unlimited number of levels. | * the reminder levels table: delay in days + email template, unlimited number of levels. | ||
| Line 88: | Line 119: | ||
= Version history = | = Version history = | ||
Full changelog, every version since the first one: [https://framagit.org/doli/modules/autoreminder/-/blob/main/ChangeLog.md ChangeLog.md] | |||
Full changelog, every version since the first one: [https://framagit.org/ | |||
= Support = | = Support = | ||
Latest revision as of 10:19, 27 October 2026
Information
| Module name | Auto Reminder |
| Editor / Editeur | Stéphane Mallet Informatique - https://web-pilot.fr/offres/rsi |
| Download or buy page / Page achat ou téléchargement | External module - https://www.dolistore.com/product.php?id=2770 |
| Status / Statut / Estado | Stable |
| Prerequisites / Prérequis | Dolibarr 19 or higher
Dolibarr min version: See on Dolistore Dolibarr max version: See on Dolistore |
| Last update date / Date mise à jour fiche / Fecha última actualización | 2026-10-27 |
| Note / Nota | Tested on Dolibarr 24. Free module, GPLv3. |
Auto Reminder automatically sends and follows up invoices and commercial proposals in Dolibarr. Everything is driven by a daily scheduled job.
Features
Invoices
- Automatic sending of validated invoices by email, with the invoice PDF attached and a configurable email template.
- Automatic reminders for unpaid invoices, based on configurable levels. Each level defines a delay in days relative to the due date (or the invoice date if no due date) and an email template. Negative delays are allowed (preventive reminder before the due date).
- Option to include or exclude partially paid invoices.
Proposals (since 1.3.0)
- Automatic sending of validated proposals by email, with the proposal PDF attached.
- Automatic reminders for proposals still unanswered (not signed, not refused, not billed). Levels are counted from the end of validity date of the proposal (or its date if none).
- Settings are fully separate from invoices: the module setup page has one tab for invoices and one tab for proposals, each with its own switches, email template and reminder levels.
Only the highest level reached is sent
For each document, only the highest reminder level reached is considered. Lower levels that were missed are never sent afterwards: a document already overdue when the module is enabled receives a single reminder, the one matching its actual delay, with the right template. Never a burst of reminders over several days.
Semi-automatic mode (since 1.3.7)
Instead of sending a reminder, the module can prepare it and let you send it yourself. Each reminder due becomes an alert:
- a bell in the top bar shows how many invoices and proposals are to be reminded, and leads to them;
- the invoice and proposal lists get a Reminder column and a To remind filter;
- the card of the document shows the alert with a Remind button, which opens the native Dolibarr send form, prefilled with the template of the level in the language of the customer, and with the recipients of the module.
The alert closes when an email is sent from the card or scheduled with Doli Mail Later, when a higher level replaces it, or when you cancel it: only this level is then skipped. The mode is set per document type in the settings (Semi-automatic mode by default), and can be changed per third party and per document with the "Reminders" field.
Reminders per third party and per document (since 1.3.7)
The "Reminders" field is available on the third party card, the invoice card, the template invoice and the proposal card:
- Automatic: the reminder goes out on its own;
- Semi-automatic: the module prepares the reminder and flags it to you;
- None: the reminder is neither sent nor prepared as an alert, and an alert already open disappears.
Left empty, the next level decides: the setting chosen on the invoice or the proposal takes precedence over that of the third party, which takes precedence over the module settings. Example: a third party in dispute is set to "None", one of its invoices to "Automatic": only that invoice is reminded. An invoice generated from a template invoice receives the setting of the template, which can then be changed on the invoice.
The initial sending of documents is not affected by this field. It replaces the "Exclude from automatic reminders" checkbox of previous versions (see Installation for the upgrade).
Recipient of the emails
The recipient is determined in this order, for sending and for reminders:
- The contact attached to the document (Contacts tab of the invoice or proposal), whatever its role. If several contacts are attached: billing then service then shipping for an invoice; follow-up then billing then shipping for a proposal.
- Otherwise the default contact of the third party for this document type (Contacts/Addresses tab of the third party).
- Otherwise the first active contact of the third party having an email.
- Otherwise the email address of the third party.
Since 1.3.1, every contact sharing the highest priority role is kept, not only the first one: two or three billing contacts attached to the same invoice all receive the email, in a single sending. The priority order is unchanged, so a billing contact still wins over a shipping one. Steps 1 and 2 above work this way; step 3 keeps a single recipient, since without a role nothing tells who handles the invoices.
Disabled contacts and contacts without email are never used. If no recipient is found, nothing is sent and an event is recorded in the document agenda.
Language of the emails (since 1.3.2)
An email goes out in the language of the third party, else in the default language of emails chosen in the module settings (since 1.3.7), else in the language of your Dolibarr. The module takes the first of these languages in which the email template exists, and sends the template of the settings as it is when none has it. The language fallback (es_MX to es_ES, then a template with no language) is the native Dolibarr one. Dates and amounts follow the language of the email sent. The attached PDF is not regenerated: it is the document as it stands.
Example: in a French Dolibarr with English as default language of emails, a third party without language receives English, a French third party French, and a German third party English when there is no German template.
Translating a template is done in Dolibarr itself, not in the module settings: create the template again with the SAME label, choose the language, then translate the subject and the content. Note that the language of third parties and templates only appears when the Dolibarr multi-language option is enabled.
Safety against mass sending
Only documents validated after the sending option was enabled are sent: enabling the module on an existing database never sends the historical documents. The reference date is stored when you enable the option, displayed in the settings, and editable: you can move it back knowingly to include part of the history. An explicit warning is shown next to the field: any document validated on or after that date and never sent will be sent on the next job run.
When a document cannot be processed
When a document cannot be processed (no valid recipient, PDF not found, email template not found, send failure), the module records an event in the document agenda with the reason in plain words, once per document and per reason. Looking at the invoice or proposal, you immediately see why nothing was sent.
Multi-company (Multicompany)
The module works with the Multicompany module. Each entity sends and reminds its own documents only, with its own settings, its own reminder levels and its own email templates. Sharing in Multicompany grants read visibility on the documents of another entity, it does not change their owner: a shared invoice is still reminded by the entity it belongs to. Nothing to configure. Before 1.3.3, an entity picked up the invoices and proposals of the entities it was allowed to see and processed them with its own settings.
Triggers for developers (since 1.3.5)
After each successful email, the module fires a trigger on the invoice or proposal, so that another module can react to it: AUTOREMINDER_SEND after the automatic sending of a validated document, AUTOREMINDER_REMIND after a reminder. The listener receives the document as $object and the details in $object->context['autoreminder']: doctype, actioncomm_id (the agenda event of this email), level_id and level_days (the reminder level, 0 and empty for the initial sending), email_to, email_from, email_subject. The module does not fire the core BILL_SENTBYMAIL and PROPAL_SENTBYMAIL triggers, which mean that a user sent the document from its card.
Installation
- Download the module zip file.
- Log in to Dolibarr as administrator, go to Home - Setup - Modules/Applications, tab Deploy/install external app/module, and upload the zip.
- Activate Auto Reminder in the Financial modules section.
The module creates its database table, its extrafields and a daily scheduled job automatically. When upgrading from a 1.x version, existing reminder levels are kept as invoice levels.
After upgrading from 1.3.6 or an earlier version, disable then enable the module: the ticked "Exclude from automatic reminders" checkboxes become "None" in the "Reminders" field. Your settings and levels are kept.
Setup
Before configuring the module, create your email templates in Home - Setup - Emails - Email templates: type Send invoice for invoices, type Send commercial proposal for proposals. One template for the initial sending, one per reminder level.
Then open the module settings. At the top of the page, shared by both document types, the Default language of emails sets the language of the emails sent to third parties whose card has no language. Left empty, it is the language of your Dolibarr.
Then there is one tab per document type (Invoices, Proposals), each with:
- the automatic sending switch and its email template. When enabled, today's date is stored: only documents validated from that date on will be sent. The date is editable (with a warning),
- the reminders switch, the Semi-automatic mode by default option (and, for invoices only, the partially paid option),
- the reminder levels table: delay in days + email template, unlimited number of levels.
The scheduled job AutoReminderJob runs once a day by default (see Home - Setup - Scheduled jobs).
Version history
Full changelog, every version since the first one: ChangeLog.md
Support
contact@stephane-mallet.fr