Do you need more control over who can be added as a follower in your system? Whether you want to limit follower selection to a specific group of users or forbid certain partners from becoming followers, either globally or on certain models, the Restrict Follower Selection module from the Odoo Community Association (OCA) provides a powerful and flexible solution.
Main Features
This module allows you to define exactly who can be added as a follower by applying custom domain filters. Key functionalities include:
- Filter the selection of available followers.
- Restrict follower addition to recipients that meet a defined domain.
Configuration
You can configure the module to apply restrictions globally across the system, or specifically for certain models (like sales orders, tasks, etc.).
Setup Steps:
-
Enable Developer Mode in Odoo.
-
Navigate to:
Settings > Technical > Parameters > System Parameters
-
Create or edit the parameter:
mail_restrict_follower_selection.domain
Set the domain according to your requirements (e.g., to allow only employees to be added as followers).
This applies a global restriction on follower selection across the system.
To apply restrictions only to a specific model, add another system parameter using the format:mail_restrict_follower_selection.domain.$your_model
For example, to restrict followers on the sale order model the parameter should look like this:
mail_restrict_follower_selection.domain.sale.order
You can combine both global and model-specific filters. Odoo will use the model-specific domain where defined, and fall back to the global domain otherwise.
Example Usage
In case only employees need to be followers across the system. Your global domain might look like: [('employee_ids', '!=', False)]
If you need to apply a stricter filter only on Sales Orders, you could set a system parameter: mail_restrict_follower_selection.domain.sale.order
with a domain that, for example, allows only users to be followers for sales orders: [('user_ids', '!=', False)]
Important Notes
- The module does not remove existing followers that don’t meet the domain conditions.
- Changes to domain filters only affect newly added followers after the update.
- When using the Add Followers wizard, the system may not apply model-specific domains in the selection popup. This is due to the wizard not always knowing which model it was triggered from.
- To navigate the issue use a broader global domain and stricter model-specific domains where needed.
- Even if an unqualified recipient appears in the list and is selected, the system will silently ignore them if they don’t match the specific domain for the model.
The module is maintained by the Odoo Community Association (OCA), with the latest version available: 18.0.1.0.0.