Skip to Content

Automated Actions

Automated actions are server-side rules that trigger automatically when records are created, updated, or deleted. They are a powerful no-code automation tool.

Navigation

Go to Settings > Technical > Automated Actions (developer mode required).

Anatomy of an Automated Action

  1. Name – A descriptive name (e.g. "Notify Manager on Large Order").
  2. Model – The model to watch (e.g. Sale Order, Invoice, Lead).
  3. Trigger – When to fire:
  • On Creation – When a new record is created.
  • On Update – When an existing record is modified.
  • On Creation & Update – Both.
  • On Deletion – When a record is deleted.
  • Trigger Fields – For "On Update" triggers, specify which field changes should activate the rule. If empty, any field change triggers it.
  • Conditional Filter (Domain) – Only fire when the record matches this domain. Example: [('amount_total', '>', 10000)] – only for orders over $10,000.
  • Actions to Execute – What happens when the rule fires:
    • Send an email (select an email template).
    • Create a new record (e.g. create a task in Projects).
    • Update a field on the current record (e.g. set a flag).
    • Execute a server action (Python code or multi-step process).
    • Add a follower to the record.
    • Create an activity (e.g. schedule a follow-up call).

    Practical Examples

    Example 1: Notify Manager on High-Value Orders

    • Model: Sales Order
    • Trigger: On Creation & Update
    • Condition: [('amount_total', '>', 50000)]
    • Action: Send Email – use a template that emails the sales manager with order details.

    Example 2: Flag Expired Credit Cards on Contacts

    • Model: Contact (res.partner)
    • Trigger: On Update (when credit card expiry changes)
    • Condition: [('credit_card_expiry', '<', current_date)]
    • Action: Update field – set "Credit Card Valid" to False, create an activity to call customer.

    Example 3: Auto-Assign Salesperson on New Lead

    • Model: CRM Lead
    • Trigger: On Creation
    • Condition: [('user_id', '=', False)] (not assigned yet)
    • Action: Execute Python code – find the least-loaded salesperson in the lead's country team and assign them.

    Testing Automated Actions

    1. Create a test record that meets the condition.
    2. Check that the action executed (email received, record created, field updated).
    3. Check the server logs if the action didn't fire.
    4. Remember that automated actions run synchronously – they execute immediately as part of the create/write operation. A slow action can make the UI feel sluggish.
    Rating
    0 0

    Commenting is not enabled on this course.

    This documentation is updated continuously. Some features described here may be renamed, deprecated, or still being finalized.