What are Studio Automations?
An automation is a rule that says: "When [trigger] happens on [model], and [condition] is true, perform [action]."
Studio Automations are stored as ir.base.automation records (also known as "Automated Actions"). You can also manage them outside Studio via Settings → Technical → Automation → Automated Actions.
Common use cases for Studio Automations:
- Send a confirmation email when a sale order is confirmed.
- Automatically assign a salesperson based on the customer's country.
- Set a due date 7 days after a task is created.
- Create a follow-up activity when an invoice becomes overdue.
- Add a follower when a record's state changes to "In Progress".
Creating an Automation
To create an automation from Studio:
- Open Studio on the app whose model you want to automate (e.g., open a Sale Order and click Studio).
- In the left panel, click the Automations tab (gear/lightning icon).
- Click New to open the automation editor.
- Give the automation a descriptive name (e.g., "Send email on order confirmation").
- Set the Trigger, Condition (optional), and Actions.
- Toggle the automation to Active and save.
Trigger Types
The trigger defines when the automation fires:
| Trigger | Fires when… | Typical use |
|---|---|---|
| Record Created | A new record is saved for the first time | Set default values, send welcome notification |
| Record Updated | A specific field changes on an existing record | React to state change, update related field |
| Record Created or Updated | On both create and write | Sync fields, log changes |
| Record Deleted | A record is deleted (unlinked) | Archive related records, notify admin |
| Based on a Timed Condition | A date on the record is reached (e.g., date_deadline) | Send reminders, auto-close expired records |
| External (Webhook) | An HTTP POST triggers the automation | Integrate with external systems |
For the Record Updated trigger, you must specify which field(s) to watch. The automation only fires when one of the watched fields changes — not on every save.
Defining Conditions (Filters)
Conditions limit when the automation fires even if the trigger is met. Click the Add a condition button to open a domain builder.
The domain builder provides a visual filter editor — the same interface used in list view filters. You select a field, an operator, and a value. Multiple conditions can be combined with AND or OR logic.
Example condition: only fire when state = 'sale' (sale order is confirmed) and amount_total > 1000.
[('state', '=', 'sale'), ('amount_total', '>', 1000)]
Actions You Can Automate
Each automation can perform one or more actions when triggered:
| Action type | What it does |
|---|---|
| Update a Record | Set a field to a specific value on the triggering record |
| Create a Record | Create a new record in any model with pre-filled values |
| Send an Email | Send an email using a chosen email template |
| Send a SMS | Send an SMS using an SMS template (requires SMS credit) |
| Add Followers | Subscribe users to the record's chatter thread |
| Create an Activity | Schedule an activity (call, meeting, to-do) on the record |
| Execute Server Action | Run a more complex server action (Python code) — advanced use |
Worked example: auto-send email when sale order is confirmed
- Open a Sale Order → click Studio.
- Go to the Automations tab → New.
- Name: "Notify manager when order confirmed".
- Trigger: Record Updated. Watched field: Status (
state). - Condition:
state = 'sale'. - Action: Send an Email. Choose the email template "Sales Order: Confirmation" (or create a new template).
- Toggle Active and save.
Now every time a sale order is confirmed (state changes to 'sale'), the chosen email template is sent automatically.
Testing Your Automation
To test without waiting for the trigger to happen naturally:
- Open a record that matches your automation's model and conditions.
- In developer mode, the record's Action menu (cog icon) includes a Run Automations option.
- Click it to manually fire all applicable automations on that record.
- Check the chatter or email log to confirm the action ran.
For time-based automations, you can adjust the record's date field to be in the past and then manually trigger the scheduler from Settings → Technical → Automation → Scheduled Actions — run the "Base Automation: Timed Conditions" action.
Be careful with "Record Updated" automations that themselves update a field being watched — this can create infinite loops. Odoo has loop detection for direct circular triggers, but complex chains can still cause unexpected behavior. Always test in a non-production environment first.
📋 Key Points
- Studio Automations =
ir.base.automationrecords built without code using a visual form. - Trigger types: Record Created, Updated, Deleted, time-based, or webhook.
- Conditions use the same domain builder as list view filters — combine field/operator/value checks.
- Actions include: update field, create record, send email, send SMS, add follower, create activity.
- Test automations using the "Run Automations" option in the record's Action menu (developer mode).
- Watch for automation loops when the action updates a watched field — test on staging first.
FAQ
Yes, through the "Execute Server Action" action type. Server actions can include Python code. However, writing that Python code still requires developer access via Settings → Technical → Server Actions. The Studio visual builder doesn't provide a Python editor — it just links to an existing server action. For truly code-free automations, stick to the built-in action types.
You specify a date field on the record (e.g., date_deadline) and a delay (e.g., -1 day = 1 day before, +3 days = 3 days after). Odoo's scheduler runs every hour and checks all time-based automations. Records where the calculated date has passed since the last check will have the automation fired on them.
Yes. In Odoo 19, Studio Automations support adding multiple actions in a single automation rule. Click "Add an action" after configuring the first one. All actions run in sequence when the automation fires.
Yes. CSV imports create records via the ORM, so "Record Created" automations will fire for each imported record. This can cause issues (e.g., sending hundreds of emails during a bulk import). To prevent this, temporarily disable the automation before a large import, or add a condition that excludes freshly imported records.