9.2 Automation: automated actions, approvals & email templates
Key Takeaways
- Automation rules (base.automation) watch a model and fire on a trigger such as On Creation, On Update, Based on Form Modification, Based on Timed Condition, or On Webhook.
- No-code automation actions include Update Record, Create Activity, Send Email, Send SMS, Add/Remove Followers, and Create Record; Execute Code is the developer-only option.
- Server actions are reusable units of logic that can be run by an automation rule, bound to a button, or exposed in the Actions (gear) menu.
- Studio approval rules attach to a button and block its action until an authorized approver from the chosen group signs off, enforcing sign-offs without code.
- Email templates use inline-QWeb placeholders like {{ object.partner_id.name or '' }}, and the Dynamic Placeholder tool inserts the correct field expression automatically.
Automation in Odoo: business logic without code
Odoo pairs Studio's structural customization with an automation layer so that business rules run by themselves. Together they let a functional consultant configure complete workflows — data validation, notifications, follow-ups, and approvals — entirely from the interface, which is exactly the kind of scenario the certification tests.
Automation rules and their triggers
An automation rule lives under Settings ▸ Technical ▸ Automation Rules (technical model base.automation). Each rule watches one model ("Applies to") and fires when a trigger occurs; you then attach one or more actions. The trigger types you should recognize:
| Trigger | Fires when… |
|---|---|
| On Creation | A record is saved for the first time |
| On Update | An existing record is saved with changes |
| On Creation & Update | Either creation or update happens |
| On Deletion | A record is deleted |
| Based on Form Modification | A field changes in the UI, before saving (onchange) |
| Based on Timed Condition | A time offset relative to a date field (e.g. 3 days before) |
| On specific field set | Stage, tag, state, priority, or archived value changes |
| On Webhook | An external system calls the rule's URL |
For update and timed triggers you narrow the scope with a filter domain (Apply on) and, for updates, a Before Update Domain, so the rule fires only on a genuine transition — for example only when a task's stage moves to "Done" rather than on every save.
Actions the rule performs
When a rule triggers it runs one or more actions to do, which are technically server actions (ir.actions.server). The no-code actions include:
- Update Record — set a value on the triggering record or a linked record.
- Create Activity — schedule a to-do for a responsible user.
- Send Email — send a message built from an email template.
- Send SMS — send a text via an SMS template.
- Add Followers / Remove Followers — manage who is notified about the record.
- Create Record — create a new record in the same model or another one.
- Send Webhook Notification — POST data to an external URL.
- Execute Existing Actions — chain several server actions in order.
- Execute Code — run Python; this is the only action that requires development.
Because the first eight options require no programming, a consultant can build surprisingly rich workflows — such as "when an opportunity is marked Won, create a follow-up activity for the salesperson and email the customer" — without a single line of code.
Server actions
A server action is the reusable unit that defines what to do. The same server action can be triggered by an automation rule, bound to a button on a form, or exposed in the Actions (gear) menu as a contextual command that a user runs on the selected records. Defining logic once as a server action and reusing it keeps behavior consistent across triggers and avoids duplicating configuration.
Approval rules
Some controls need a human decision, and for those Studio adds approval rules to a button. In Studio you select a button, enable Approval, and set the approver group, optionally the number of approvals required, and a message shown to the approver. When a user clicks that button, Odoo blocks the underlying action until an authorized approver signs off; requiring several distinct approvers creates a multi-step approval. This is how a spending limit, a discount ceiling, or a document sign-off is enforced — again, entirely without code.
Email templates and dynamic placeholders
Email templates (technical model mail.template, under Settings ▸ Technical ▸ Email Templates) hold reusable messages tied to a model. A template stores the Applies to model, the subject, recipients (To/Cc or specific partners), the HTML body, attachments, and a language. Dynamic content comes from placeholders written in inline QWeb: {{ object.field }} renders a value, and you add a safe fallback with or, for example {{ object.partner_id.name or '' }}, so an empty field never prints an error. The Dynamic Placeholder helper in the editor lets you pick a field and inserts the correct expression automatically, so you rarely type the path by hand. A template can also localize by rendering in the recipient's language.
Studio and automation working together
The real power appears when the two are combined. Studio provides the structure — a custom Selection field, a new pipeline stage, an approval button — and automation supplies the behavior — when the Selection reaches "Approved," update a date, notify the manager, and send a templated email. A typical exam question hands you a business requirement and asks you to assemble the right no-code pieces: a Studio field, an automation rule with the correct trigger and domain, a server action, an approval rule where a person must sign off, and an email template with placeholders. Recognizing which tool solves which part — and that all of it is achievable without programming — is the core competency this topic assesses.
You want an automation rule to send a reminder email exactly three days before a subscription's renewal date. Which trigger type fits?
In Odoo, what is the correct inline-QWeb placeholder to insert a record's customer name into an email template with a safe fallback if it is empty?
A company wants purchase orders above a threshold to require a manager's sign-off before the confirm button's action runs. Which no-code Odoo feature enforces this?