Automated Actions (and their close cousin, Server Actions) are a powerful way to add functionality to Odoo without any programming (or with only a few lines of Python code).
- Set default values
- Simple workflow
- e.g. automatically change the “stage” of a document based on rules, and / or add validation if a user tries to change the “stage” manually.
- Create records in another table and add a link
- Various other actions listed below (including sending email)
Automated Actions can be triggered on Creation, Deletion or Update of a database record in the specified Odoo Model (database table).
- Update fields on the current model (database table)
- Set a fixed value
- Derive a new value from other fields
- Clear a field
- Create new records on another table
- Send email
- Add followers
- Create activities
- Other Python functions (e.g. Error Messages, Copy Records)
All of the above can be made conditional based on business rules.
Here are a few examples:
- Create Reordering Rules for new products
- Create a BOM for a new product
- Set income and expense accounts for a new product
- Set Routes for new products
- Workflow validation in CRM
- Stop users archiving products
- Set company on contacts (Odoo 13)
- Create analytic accounts for sales orders
Start by enabling developer mode and navigating to Settings / Technical / Automated Actions.
If you cannot find this option, you may need to install the module “Automated Action Rules”.
First remove the “Apps” filter by clicking on the ‘X’:
Then search for “Automated”
If it’s not installed, click on ‘INSTALL’.
Then follow the instructions for the specific Automated Action.
Create records in another table and add a link
This is a quite powerful function. One example is to create analytic accounts for sales orders, which replicates the standard functionality in Odoo to automatically create an Analytic Account for each project.
- This example also contains some information about how to overcome a bug in Automated Action.
There will be other business cases where this could be a good technique.
Create records in another table (no link)
This is also useful (and easy to setup): Create Reordering Rules
Send email alerts
This is another handy feature, though email templates are not easy to setup!
Various types of validation can be done: