Trigger On Create Automation in Odoo 17

Karan Bishwakarma
2 min readMar 15, 2024

Automation Rules, previously known as Automated Actions, have undergone significant changes in Odoo 17. While the basic elements and foundation remain intact, it’s essential to grasp the fundamental components to fully comprehend their functionality. For a detailed understanding of these components, refer to Odoo 17 Automation Essentials: Understanding the Key Components of Automated Actions.

While Odoo 17 has seen significant enhancements in automated actions, one notable change is the removal of the On Creation trigger point. This trigger was previously utilized to automate actions when records were being created. This change from Odoo is to simplify the workflow and as mentioned in https://github.com/odoo/odoo/pull/114352. Nonetheless, a workaround exists to trigger automation upon creation.

To trigger actions specifically on creation in Odoo 17, the official workaround involves utilizing the “On save” trigger and selecting the creation date as the trigger point. By designating the creation date as the trigger, you can effectively replicate the behavior of an “On Create” event.

Let’s understand this with an example: sending a welcome email when a new contact is created.

  1. Navigate to Settings >> Technical >> Automation >> Automation Rules
  2. Create a new Automation Rule and specify the model ( Contact in our case)
  3. Select On save as the trigger since On Create and Write has been renamed to On save

4. Choose the “Created On” (creation date) field under “When updating” as it is updated when a record is created.

5. Define the desired action. In our example, an email will be sent whenever a new contact record is created.

In conclusion, although Odoo 17 has moved away from the direct “On Create” trigger point, users can utilise the “On save” trigger with creation date conditions to achieve similar outcomes.

--

--

Karan Bishwakarma

Odoo Developer @ Target Integration | Interested in Business and Technology