Se rendre au contenu

Odoo Automated Actions: Complete Workflow Automation Tutorial 2026

Learn to build automated workflows with server actions and activity rules in Odoo
4 mai 2026 par
Odoo Automated Actions: Complete Workflow Automation Tutorial 2026
Odoo Skillz, Odoo Skillz
| Aucun commentaire pour l'instant
TL;DR
8
Trigger types available
5
Action types to automate workflows
Zero
Coding required for basic actions
  • Automated actions in Odoo trigger workflows based on record changes, dates, or external events
  • No coding needed for basic actions like sending emails, updating fields, or creating activities
  • Python server actions enable complex custom logic for advanced automation scenarios

Every minute spent on repetitive tasks in Odoo is a minute not spent on strategic work. Automated actions eliminate the manual steps that slow down your team: sending follow-up emails, updating record statuses, escalating overdue tasks, and notifying the right people at the right time.

This guide covers the complete setup of automated actions in Odoo, from simple email notifications to complex Python-based server actions. By the end, you will have a clear understanding of when to use each trigger type and action, with practical examples you can implement immediately.

Automated workflow pipeline showing trigger-action-result flow

Understanding Odoo Automated Actions

Automated actions in Odoo are rules that monitor specific models and execute predefined actions when conditions are met. Think of them as automated responses to events in your system: a new lead arrives, an invoice becomes overdue, a project reaches a deadline.

Each automated action consists of three components: a trigger that determines when to evaluate the rule, conditions that filter which records qualify, and actions that define what happens when a record matches. This structure allows you to build sophisticated workflows without writing custom code.

  • Trigger: When the rule is evaluated (record creation, value change, date-based, form modification)
  • Condition: Additional filtering to narrow down which records activate the action
  • Action: What happens when triggered (email, field update, activity, Python code)

Step 1: Enable Automation Features

Automated actions require Developer Mode and the appropriate module installation.

Activate Developer Mode

Navigate to Settings, then scroll to the bottom and click "Activate the developer mode". Developer mode exposes the Automation menu where automated actions are configured. Without it, the automation interface is hidden from the standard user view.

Install the Automation Module

In some Odoo versions, the automated actions feature requires the "Automated Action Rules" module. Navigate to Apps, search for "Automated Action Rules", and install it if not already present. This module provides the base infrastructure for all automated action types.

Odoo automated action configuration screen with trigger conditions and action types

Locate the Automation Interface

Once developer mode is active, navigate to Settings, then Technical, then Automation, then Automated Actions. This is where you create and manage all automated action rules. Each rule is tied to a specific model, such as Contacts, Sales Orders, or Tasks.

Step 2: Configure Your First Automated Action

Start with a simple example: automatically sending a welcome email when a new contact is created.

Select the Model and Trigger

Create a new automated action and set the following fields:

  • Model: Select "Contact" (res.partner). This tells Odoo which records to monitor.
  • Trigger: Select "On Creation". This ensures the action fires only when a new contact is created, not when existing contacts are modified.
  • Action To Do: Select "Send Email". This determines the type of action executed.

Configure the Email Template

With "Send Email" selected, you need an email template. Navigate to Settings, then Technical, then Email Templates, and create a new template for contacts. Set the model to "Contact", design the subject and body using Odoo template syntax, and reference contact fields like the partner name and email address.

Back in your automated action, select the email template you just created. When a new contact is created, Odoo automatically sends the welcome email using this template.

Email notification automation workflow with trigger conditions

Add Conditions for Precision

Not every new contact should receive the same welcome email. You can add conditions to refine when the action triggers. In the automated action form, use the "Before Update Domain" and "On Conditions" fields to add filtering logic.

For example, to send welcome emails only to contacts marked as customers: set the condition field to filter on the "Customer" boolean field being true. This prevents the email from going to suppliers, internal contacts, or leads.

Step 3: Explore Action Types

Odoo supports multiple action types, each suited for different automation scenarios.

Update Record Fields

The "Update Record" action modifies field values on the triggering record. Common use cases include automatically setting a stage when certain conditions are met, updating a status field based on date thresholds, or populating computed values when source data changes.

For example, create an action on the Sales Order model that automatically sets the state to "Urgent" when the order amount exceeds a certain threshold. This triggers additional review workflows without manual intervention.

Create Activities

The "Create Activity" action generates a scheduled activity on the triggering record. Use this to assign follow-up tasks, schedule calls, or set reminders. For instance, when a support ticket is marked as resolved, automatically create a "Customer Satisfaction Survey" activity for the assigned agent to complete within three days.

Activities integrate with the Odoo activity dashboard, giving your team a centralized view of pending tasks generated by automation rules.

Execute Python Code

For complex logic that built-in action types cannot handle, the "Execute Python Code" action runs arbitrary Python code. This provides unlimited flexibility: you can create related records, call external APIs, perform complex calculations, or execute multi-step workflows.

Python server actions have access to the record through the record variable and the environment through env. You can create, update, or search for records using standard Odoo ORM methods.

Example: Auto-generate a project task when a sales order is confirmed.

The Python code creates a new task in the Project module, links it to the sales order, and assigns it to the project manager. This bridges the gap between sales and operations without requiring manual task creation.

Step 4: Date-Based Automation Rules

Date-based triggers are powerful for time-sensitive workflows. Instead of reacting to record changes, these rules evaluate records based on date fields.

Trigger Based on Date Fields

Configure a date-based trigger by selecting "Based on date field" as the trigger type. Choose the date field to monitor, such as the invoice due date, contract expiration date, or order delivery date. Set the timing condition: you can trigger the action a specific number of days before or after the date field.

For example, trigger an automated action 3 days before an invoice due date to send a payment reminder. Or trigger 30 days before a contract expiration date to notify the account manager about renewal.

Timing Condition Configuration

The timing condition determines when relative to the date field the action fires. Options include:

  • After creation: Trigger a set time after the record was created
  • After last update: Trigger a set time after the record was last modified
  • Before/after date field: Trigger relative to a specific date on the record
  • After next activity: Trigger after the next scheduled activity date

Choose the timing that aligns with your workflow. Payment reminders should fire before the due date. Follow-up surveys should fire after the delivery date.

Step 5: Testing and Debugging Automated Actions

Testing Your Rules

Before relying on automated actions in production, test each rule thoroughly. Create a test record that matches your trigger conditions and verify the expected action executes. Check the mail outbox for sent emails, review updated field values, and confirm activities were created.

Debugging Common Issues

If an automated action does not fire, check the following: verify the trigger type matches the event you expect, confirm the model is correct and the rule is active, review any conditions that might filter out your test record, and check the action configuration for required fields.

Enable debug logging to trace automated action execution. Navigate to Settings, then Technical, then Logging, and increase the log level for the automation module. The log output shows when rules are evaluated and whether they matched records.

Performance Considerations

Automated actions execute synchronously during record operations. Complex actions, especially Python code that queries many records, can slow down the triggering operation. Keep actions focused and avoid heavy computations. For resource-intensive tasks, consider using scheduled actions instead of record-triggered actions.

Summary

Key Takeaways:

  • Automated actions consist of a trigger, optional conditions, and an action to execute
  • No coding required for basic actions like sending emails, updating fields, or creating activities
  • Python server actions provide unlimited flexibility for complex custom workflows
  • Date-based triggers enable proactive workflows for deadlines, renewals, and follow-ups
  • Test each rule thoroughly before relying on it in production environments

FAQ

Do I need developer mode to configure automated actions?

Yes, automated actions are available in the Technical menu, which requires developer mode. Activate it by going to Settings and clicking "Activate the developer mode" at the bottom of the page.

Can automated actions trigger on multiple models at once?

Each automated action is tied to a single model. However, the action itself can create or modify records on other models. For multi-model workflows, create separate automated actions for each model.

How do I prevent automated actions from creating infinite loops?

Odoo has built-in safeguards against infinite loops in automated actions. Additionally, design your conditions to avoid re-triggering on records modified by the action itself. Use "On Creation" triggers when possible to avoid recursive updates.

Can I use automated actions with custom modules?

Yes, automated actions work with any model, including custom models from third-party modules or your own development. The model just needs to be registered in Odoo's model registry.

What happens if an automated action fails?

If an automated action fails, Odoo logs the error and the original record operation may be rolled back depending on the error type. Check the server logs for error details. For email sending failures, the record operation usually continues but the email is not sent.

References

Master Odoo Automation

Explore our complete library of Odoo automation guides, from simple email rules to advanced Python server actions.

Read All Guides Explore Products

Partager cet article
Se connecter pour laisser un commentaire.