How to Easily Configure Automated Actions in Odoo18

ADHICHAND
December 2, 2024

Odoo is a complex and multifunctional business management software intended for solving a business tasks usually faced by companies, regardless of their size. Odoo is most suitable for systemizing and centralizing your business operations because it has a broad range of modules such as sales, inventory, Customer Relationship Management (CRM), accounting, and Human Resources and because of these attributes, Odoo fine resolution for companies that want to enhance their business processes and could be reviewed to fit different companies’ sizes. in this blog explore how to How to Configure and Customize Automated Actions in Odoo18 for different business needs and discover the potential applications

Another is a unique feature of Odoo, which provides facilities for organizing repetitive processes, thus enforcing the safety of the business knowing that crucial processes occur without much supervision. Automated Actions are even getting better in Odoo 18, allowing users to clearly create as many new Automated Actions in Odoo18 as there are across different Odoo modules. They can include tasks like sending out a reminder or updating a record or initiating a more comprehensive process, based on a set of guidelines and parameters – thus helping you monitor and manage your operations efficiently without much fuss.

UAE businesses can save valuable time, minimize errors, and boost productivity by automating repetitive tasks.

How to Configure Automatic Actions in Odoo18

To set up the Automatic Actions in Odoo, install the Automation Action Rules module and make sure to install the base_automation module

automation-rules-module

Creating SWF shortcuts

To create SWF shortcuts, first, go to developer mode. Then you need to click on Settings and then go to Technical and then Automated Actions in Odoo18. Here for example you can set some rules and conditions which will trigger specific actions automatically to improve your process and to increase the level of data integrity. That is depicted here by the following figure.

automatic-rules

To set up an automated actions with trigger conditions and domains in Odoo 18, follow these simple steps

automated-actions-in-odoo18

Name You can enter any name of automated action right here.

Model Now choose the model where you want the automated action (Eg: Sale Order).

Triggers

Here is the different types of triggers

  • Values Updated: Automation occurs when particular alterations take place For instance,
  • A user linked to a record.
  • A tag added to an item.

    It may also involve a change in the status of the record, (for instance) from ‘Draft’ to ‘Confirmed’.

    Upon Update

    Automation occurs when certain change occurs including:

      • On Incoming Email: Automatically kicks in as soon as a new mail is received. For instance, it will be utilized where, the creation of the lead from the received email or updating the record from the received communication.
      • On Outgoing Email: Some of the actions that can occur when an email is sent from Odoo include carrying out a follow on operation after an invoice has been emailed or recording the email exchange in a linked document.

      Timing conditions

      An example of such events is: The former means that automation triggers can be based on the time of the day, week, month or year, etc.

        • Based on Date Field: Triggers an automation event at a specific time, based on a date field in the record (such as a due date or deadline).
        • After Creation: Triggers the action a given period of time after the creation of a record.
        • After Last Update: Called after a certain time interval since the automated updates to a record is updated.

        Custom

          This trigger can set to functions such as

          • On Save: Runs automation whenever a record is saved – making possible for actions to work on data entry and changes.
          • On Deletion: Executes actions each time a record is deleted, to run a notification or make a log, for instance.
          • On UI Change: Performs the automation process as a result of alteration of the form fields or values present in the user interface.

          External

          Events for which triggers automation can used include

            • On Webhook: Runs automation when a webhook is triggered from another system to enable Odoo to act to events happening in external environments like third-party applications.
            automated-actions-in-odoo18

            An automation lets you set conditions for when changes should happen with a a domain filter, you can make sure updates only happen if those specific conditions are met, keeping everything smooth and efficient.

            Define further when the automated action is going to be applied to records within the selected model. Sometimes you may interested in working on records within a specific range, period, or with specific values.

            Define the kind of action to taken through automation (Server action). Odoo offers ten different types of actions:

            Types of Actions in Odoo18

            • Execute Python Code This option gives you the opportunity to execute a selected piece of Python code. You may write the code in the right tab, Python Code with the provided list of available variables.
            • Create a New Record This action is used to save a new record to any model at one go.
            • Update the Record This action allows you to input restricted values to fields in the record currently being used to display the data, to ensure the information is updated.
            • Send Email This action sends an invoice to a contact linked to the record. You can either select an existing email template or create a new one from the Home page under Contacts.
            • Add Followers Contribute this action to automatically add required contacts to the record follower list.
            • Remove Followers To apply this action, certain contacts are automatically unsubscribed to the record as followers.
            • Create Activity This helps you to create a new activity related to the record and thus you can schedule it. This can set in the Activity tab where you will also choose the user who is responsible for the activity. If the same user should always assigned, select “Specific User” and control on a responsible person. Otherwise, if the user is to calculated based on record, select “Dynamic User From Record” and type in the correct field tag
            • Send SMS This action can either send an e-mail to the contact associated with the record, or send an SMS message to a contact linked with the record. You can chose an existing SMS Template or you can create a New SMS Template.
            • Send Webhook Notification Makes a POST call to another system also known as a webhook.
            • Execute Existing Actions Describes a single server action which in turn elicits several other server actions.
            automated-actions-in-odoo18


            Allowed Groups

            Identify which particular user groups are allowed performing the server actions. However, only the members of these groups will bave the permission to initiate the automatic operations

            Action Details

            Here, define what action the automation will take once the set conditions are met and this defines the outcome asap the specified conditions trigger the action.

            Automated Actions In Odoo18 Executed via Code:

            First of all, you have to come up with an XML file. For example, you can create an action which automatically posts an invoice when a stock picking that is linked with a purchase order is completed. The invoices should not submitted yet; rather it should be in the draft form.

            <odoo>
             <!-- Server Action on Stock Picking Done -->
             <record id="action_create_invoice_on_purchase_done" model="ir.actions.server">
             <field name="name">Create Invoice from Purchase Order</field>
             <field name="model_id" ref="stock.model_stock_picking"/>
             <field name="type">code</field>
             <field name="code">
             purchase_order = record.purchase_id
             if purchase_order and purchase_order.invoice_status == 'to invoice':
             purchase_order.action_create_invoice()
             </field>
             </record>
             <!-- Automated Action on Stock Picking Done -->
             <record id="automated_action_create_invoice_on_picking_done" model="base.automation">
             <field name="name">Create Invoice on Picking Done</field>
             <field name="model_id" ref="stock.model_stock_picking"/>
             <field name="trigger">on_create_or_write</field>
             <field name="filter_domain">[('state', '=', 'done')]</field>
             <field name="action_server_ids" eval="[(4, ref('action_create_invoice_on_purchase_done'))]"/>
             </record>
             
             </odoo>

            An action will created as can clearly seen in the figure below once the custom module containing this installed functionality.

            automated-actions-in-odoo18

            Create Invoice from Purchase Order code purchase_order = record.purchase_id if purchase_order and purchase_order.invoice_status == ‘to invoice’: purchase_order.action_create_invoice() Create Invoice on Picking Done on_create_or_write [(‘state’, ‘=’, ‘done’)]

            Automated Actions in Odoo18 are one of the biggest chances for businesses to get more cooperation since this possibility lets organizations perform many tasks at the same time and avoid spending time on repeated mundane tasks that can easily routinized. To make such function attractive, users can set certain triggers and define certain actions in advance so that unnecessary time is saved and errors minimized.

            Server Actions and XML configurations make Odoo capable of providing each organization with the automation it requires. This in turn leads to the advantage whereby only the crucial tasks are dealt with leaving teams to deal with the main issues such as empowering growth and innovativeness. In sum, all the features mentioned above will facilitate the proper functioning of business processes

            Automating tasks in Odoo18 can increase your business efficiency, save time, and reduce errors, letting you focus on growth. Transines Solutions offers expert, implementation, customization, and staff augmentation services to help you simplify operations. Contact us today for a free Odoo consultation and discover how we can enhance your business with Odoo 18. Explore our Custom ERP services and get started with Transines Solutions your trusted Odoo partner in the UAE

            "Unlock the Full Potential of Your Business with Odoo ERP!"

            "Get a Cost Estimate for Your ERP Project, Absolutely FREE!"

            Get a Free Quote

            Leave a Reply

            Your email address will not be published. Required fields are marked *