Enhancing Odoo Functionality with Automated Actions

Automated Actions in Odoo

by Khurram Iftikhar

Automated actions in Odoo can transform how businesses operate by reducing manual tasks. This article guides you on leveraging automated actions to enhance your Odoo experience.

Odoo’s functionality can be significantly enhanced through automated actions in various ways:

Streamlined Workflow

Automatically move a document through different stages based on predefined conditions, helping to simplify and streamline business processes. For example, when a sales order is confirmed in the Sales module, it can automatically transition to the "Invoiced" stage once the invoice is created, ensuring a smooth flow from order to payment.

Validation Mechanisms

Set up validation rules to prevent users from changing document stages inappropriately, ensuring data integrity and compliance with business rules. For instance, in the Inventory module, you can implement a validation rule that prevents a stock move from being marked as "Done" unless all items have been picked and packed, ensuring accuracy in inventory management.

Task Automation

Automatically generate follow-up tasks for users based on specific triggers or events, improving task management and ensuring no critical steps are missed. For example, if a sales lead is converted into a customer in the CRM module, a follow-up task could automatically be generated for the sales representative to check in after a week.

How to Configure Automated Actions

To configure automated actions effectively, follow these steps:

  • Enable developer mode in Odoo.
  • Navigate to Settings and find the Technical section.
  • Select Automated Actions to begin configuration.
  • From here, you can define the rules and conditions that trigger automated actions to streamline your workflow and improve data accuracy.
How to configure automated actions in Odoo
Installation

If you are unable to locate the automated actions option, you may need to install the Automatic Action Rules module. To do so, begin by removing the "Apps" filter. Simply click on the 'X' icon next to it.

Install Automatic Action Rules module in Odoo
Schedulers

Schedulers are automated processes that execute at predefined intervals without requiring manual intervention. They perform various tasks in the background, simplifying the execution of background jobs. To schedule a task, simply insert a record into the cron table, and Odoo will execute it according to the defined schedule.

Schedulers in Odoo

Configuring Automated Actions with Trigger Conditions

To configure an automated action with trigger conditions and domains in Odoo 17, follow these steps:

1. Specify the Model

Specify the model where the automated action will be applied.

2. Define Triggers

Choose from the following triggers:

Upon Creation

This trigger initiates the action when a new record is created and subsequently saved.

Upon Update

This trigger activates the action when a previously saved record is modified and then saved.

Upon Creation & Update

This trigger initiates the action upon the creation and subsequent saving or editing and saving of a record.

Upon Deletion

This trigger activates the action upon the deletion of a record.

Based on Form Modification

The action is triggered when any change is made to a trigger field's value on the Form view, even before saving the record. This trigger only functions on the user interface when a modification is made by a user. If the field is altered through another action and not by the user, the action will not run.

Based on Timed Condition

The action is initiated when the date or date & time value of a trigger field reaches a specific point in time. To activate the action after the Trigger Date, specify a duration in minutes, hours, days, or months under Delay after the trigger date. Alternatively, to trigger the action before the specified date, input a negative duration.

3. Apply on

Specify the criteria for applying the automated action to records within the model, to apply filters on a model.

4. Define the Action

Define the desired automated action (server action). There are eight types of actions available:

Define automated action in Odoo
Execute Python Code

This action executes Python code. The available variables are detailed on the Python Code tab, where you can also write your code, or on the Help tab.

To enable the action to be executed via the website, check the box for Available on the Website and provide a Website Path.

Create a New Record

This action is used to create a new record within any model.

Update the Record

This action is used to assign value(s) to the field(s) of any record within the current model.

Execute Several Actions

This action is employed to trigger multiple actions simultaneously. To do so, click on "Add a line" under the Actions tab. In the Child Actions pop-up, select "Create and configure the action."

Send Email

This action is used to send an email to a contact associated with a specific record. To achieve this, either select an existing Email Template or create a new one.

Add Followers

This action is utilised to subscribe existing contacts to the record.

Create Next Activity

This action is employed to schedule a new activity linked to the record. Utilise the Activity tab to set it up as usual. Instead of the "Assigned to" field, choose an Activity User Type. Opt for "Specific User" and specify the user under "Responsible" if the activity should consistently be assigned to the same user. To dynamically target a user associated with the record, select "Generic User From Record" and adjust the User field name if necessary.

Sending SMS Text Message

This action is utilised to dispatch an SMS to a contact associated with the record. To accomplish this, choose an existing SMS Template or create a new one.

To link the record that initiated the creation of the new record, choose a field under Link Field. For instance, you could automatically generate a contact when a lead is converted into an opportunity.

Wrap-Up

Automated actions in Odoo offer numerous benefits that can enhance business processes and improve efficiency. By setting up these automated actions, users can streamline their workflows, maintain data integrity, and automate repetitive tasks.

Optimise Your Business with Customised Odoo Solutions


Explore how tailored Odoo solutions can enhance your operations. Our experts are ready to guide you.

Get Your Odoo Consultation

in ERP
Khurram Iftikhar 1 October, 2024
Archive
Sign in to leave a comment
How to Calculate Sales Margins and Apply Discounts in Odoo 17