Skip to main content

Globalteckz

Different Types of Actions in Odoo

  • Home
  • Different Types of Actions in Odoo
various types of actions in odoo

Different Types of Actions in Odoo

Odoo Technical Guide

Types of Actions in Odoo: A Complete Developer Guide

Actions in Odoo define how the system responds to user interactions, opens views, executes server-side operations, navigates to URLs, and generates reports. Understanding the different types of actions in Odoo is essential for developers who build custom modules, configure workflows, and extend ERP functionality.

This guide explains the core Odoo action types, scheduled actions, automated actions, action bindings, menu actions, and Python-returned action responses, along with their common use cases and technical considerations.

Odoo is a modular ERP platform in which actions connect menus, buttons, views, reports, and backend operations. For example, clicking a menu can open a list of customers, selecting a button can launch a wizard, and a report action can generate a PDF document.

Understanding these mechanisms helps developers determine where a process should run, what information it should use, and how the result should be presented to the user.

Version note: This article retains examples from the original Odoo 13 tutorial. Action fields, supported targets, client-side APIs, and automation interfaces can differ across Odoo versions. Verify implementation details against the version you are developing for.

What Are Actions in Odoo?

Actions are records or returned action descriptions that instruct Odoo on what should happen next. Depending on the action type, Odoo can open a model view, execute backend logic, navigate to a URL, invoke a client-side component, or generate a report.

Actions are commonly defined through XML records, configured through the user interface where supported, or returned by Python methods. Their behavior depends on the action type and the relevant model, view, context, and execution environment.

Core Action Types in Odoo

Odoo's core action framework includes five main ir.actions.* types. Scheduled actions are also important for automation, but use the separate ir.cron model.

01

Server Actions

ir.actions.server

Execute configured server-side operations such as supported Python code or record updates.

02

Window Actions

ir.actions.act_window

Open model views such as list, form, kanban, or other supported views.

03

URL Actions

ir.actions.act_url

Navigate to a specified web address or URL.

04

Client Actions

ir.actions.client

Trigger a client-side action identified by a tag and handled by the frontend.

05

Report Actions

ir.actions.report

Generate or display reports such as invoices, quotations, and delivery documents.

06

Scheduled Actions

ir.cron

Run configured server-side jobs at defined intervals. This is a separate model, not an ir.actions.* subtype.

In Odoo, action records can be inspected through technical menus when developer mode and the required access rights are enabled. In versions that expose the relevant menus, navigate to Settings → Technical → Actions. The exact menu organization can vary by version.

Odoo technical settings showing action configuration
Odoo technical action configuration screen from the original tutorial.

Common Fields Used in Odoo Actions

The fields available depend on the action model. When reviewing or creating an action, developers may encounter fields such as the following.

Field Purpose
NameIdentifies the action in configuration and relevant interfaces.
ModelSpecifies the business model associated with the action where applicable.
Binding ModelAssociates an action with a model so it can appear in relevant contextual menus.
Binding TypeIdentifies the contextual menu category where the action may be exposed.
View ModeSpecifies the supported view types for a window action.
View IDReferences a specific view when a particular view is required.
ContextPasses contextual values that can influence defaults or behavior.
DomainDefines filtering conditions for records displayed by a window action.
TargetControls the destination or presentation behavior supported by the action.

Not every field applies to every action model. For example, window action view settings are not interchangeable with report action configuration.

1. Server Actions in Odoo

Server actions use the model ir.actions.server and perform operations on the server side. Depending on the Odoo version and configuration, server actions can execute Python code, create records, update records, or run a sequence of configured actions.

They are useful when users need to trigger a defined operation from a contextual menu or when an administrator wants to configure a supported server-side operation without building a separate interface.

Common server action operations include:

  • Execute Python code supported by the action environment.
  • Create a new record with specified values.
  • Update values on an existing record.
  • Execute multiple configured actions in sequence where supported.

Important fields in the original Odoo 13 context:

  • Model: The business model associated with the operation.
  • Binding Model: The model whose contextual menu can expose the action.
  • Binding View Types: Specifies applicable view types for the binding, subject to version support.
  • State: Identifies the configured server action operation.
  • Code: Holds the Python code for a code-based action.

In the original Odoo 13 implementation, server action states include names such as code, object_create, object_write, and multi. Verify these implementation details against the target version.

Example of server action configuration in Odoo
Server action example from the original Odoo development tutorial.

A server action can be used for tasks such as updating selected records or triggering a defined business operation. Python code executed by a server action must follow Odoo's execution restrictions and security model. Avoid granting excessive permissions or executing untrusted code.

Related resource: Odoo development services.

2. Window Actions in Odoo

Window actions use ir.actions.act_window. They open model views and allow users to interact with business records.

For example, selecting a Customers menu can open a list of customer records. Selecting a record can open its form view, while another menu may display the same model using a kanban view.

Window action configuration and view modes in Odoo
Window action configuration example.

Common window action fields include:

  • Res Model: The model whose records should be displayed.
  • Res ID: The record ID to open when a specific record is required.
  • View Mode: The view types available for the action, subject to version support.
  • View ID: A reference to a particular view.
  • View IDs: View-specific configuration used to determine available views and their order.
  • Search View: The search interface associated with the action where configured.
  • Context: Additional values passed into the view or model environment.
  • Domain: A filter used to limit which records are displayed.
  • Target: The display destination supported by the version and action type.

Example use case: A custom button on a sales order can open a related list or a wizard. The implementation depends on whether the action needs to display existing records, open a form, or launch a transient wizard.

Python method returning an Odoo window action
Python action example from the original Odoo tutorial.

3. URL Actions in Odoo

URL actions use ir.actions.act_url. They allow Odoo to navigate to a specified URL, which may point to a website or another web resource.

A URL action can be useful when a user needs to open an external service, navigate to a relevant web page, or access a URL generated for a business process.

URL action configuration in Odoo
URL action configuration example.

Key fields:

  • URL: The destination address.
  • Target: Controls how the destination is opened, according to the action's supported options.
Python code example for an Odoo URL action
Python URL action example from the original tutorial.

In the original Odoo 13 context, target options include self for the current window and new for opening a new window. Confirm supported target values for the Odoo version in use.

Always validate URLs and avoid sending confidential information through an external URL unless the destination and data handling have been reviewed.

4. Client Actions in Odoo

Client actions use ir.actions.client. They are handled by the Odoo web client rather than being defined solely by a server-side operation. A client action typically uses a tag that identifies the frontend behavior to execute.

Developers can use client actions for custom frontend screens, dashboards, or interactive interfaces when standard view types do not meet the requirement. The frontend implementation must be registered using APIs supported by the target Odoo version.

Client action definition in Odoo XML
Client action definition from the original Odoo example.

Important concepts:

  • Tag: Identifies the client-side action implementation.
  • Params: Supplies additional parameters to the client action where supported.
  • Target: Controls presentation behavior supported by the relevant client action and version.

The original tutorial references a client-side widget named pdf_report_page. This is an example identifier, not a built-in client action that can be assumed to exist in every Odoo installation.

Client-side APIs have changed across Odoo versions. Older widget-based examples may require significant changes when moving to newer frontend frameworks and registries.

5. Report Actions in Odoo

Report actions use ir.actions.report. They allow users to generate or display reports for business records, including quotations, invoices, delivery slips, and other operational documents.

Report action configuration in Odoo
Report action configuration example.

Common report action fields include:

  • Name: The report action's descriptive name.
  • Model: The business model associated with the report.
  • Report Type: The report rendering type supported by the version and configuration.
  • Report Name: The technical report identifier used to locate the report template.
  • Groups: Access restrictions controlling which user groups can use the report action.
  • Paper Format: Print layout settings where applicable.
  • Attachment: Configuration used to determine an attachment name where supported.
  • Attachment Use: Controls reuse of stored report attachments according to the report configuration.
Odoo report action example for generating a business report
Report action example from the original Odoo tutorial.

Odoo report actions commonly work with QWeb templates to generate printable documents. Rendering formats and supported configuration depend on the version and installed components.

When developing custom reports, check template identifiers, access permissions, record data, paper format, and whether attachment caching is appropriate for the document.

6. Scheduled Actions in Odoo

Scheduled actions use ir.cron. They allow configured server-side jobs to run at defined intervals, making them useful for recurring processes that should not depend on a user clicking a button.

Depending on the implementation, scheduled jobs may process queued tasks, perform periodic maintenance, synchronize information, or execute other recurring operations.

Common scheduled action settings include:

  • Model or Method: The model and method associated with the scheduled job.
  • Interval: The configured interval between executions.
  • Next Execution: The scheduled time for the next run.
  • Active: Whether the scheduled action is enabled.
  • Execution Limits: Additional controls available in the relevant version and configuration.

Scheduled actions should be designed to handle failures, avoid unintended duplicate processing, and operate efficiently on large datasets. Review execution logs and access rights when troubleshooting a scheduled job.

Scheduled actions vs automated actions: A scheduled action runs according to a time-based schedule. Automated action rules are generally designed to respond to configured record events or conditions. They serve different purposes.

7. Automated Actions in Odoo

Automated Actions allow businesses to trigger configured operations when specified record events or conditions occur. Unlike scheduled actions, which run according to a time-based schedule, automated actions are generally associated with changes or events involving business records.

In relevant Odoo versions, automation rules are commonly implemented through the automation framework, including the base.automation model. Available triggers and configuration options depend on the version and installed modules.

Common use cases include:

  • Updating a field when a configured condition is met.
  • Creating an activity or notification in response to a business event.
  • Executing an approved server-side operation when a record changes.
  • Triggering a workflow based on defined record conditions.

For example, an automation rule could perform a follow-up operation when a sales opportunity reaches a particular stage, subject to the available triggers and configuration.

Technical distinction: Automated Actions are not another core ir.actions.* subtype. They are automation rules that can execute supported operations when configured triggers or conditions occur.

8. Action Bindings in Odoo

Action bindings determine where certain actions appear in the Odoo user interface. They associate an action with a particular business model so users can access it from relevant contextual menus.

For example, a server action may appear in the Action menu when users select customer records. A report action may be available from the Print menu for a supported model.

Important binding fields include:

  • Binding Model: Identifies the model with which the action is associated.
  • Binding Type: Determines the contextual menu category, such as Action or Print, where supported.
  • Binding View Types: Specifies applicable view types, subject to version support.

Action bindings do not execute a new type of business operation by themselves. They control how supported actions are exposed to users in the interface.

9. Menu Actions in Odoo

Menu items provide the navigation structure of Odoo applications. A menu item can be associated with an action so selecting the menu opens the corresponding view or interface.

Menu items are represented by the ir.ui.menu model. The linked action can be a window action, client action, or another supported action type.

For example, a custom Inventory menu can open a list of stock records using a window action. A custom application menu can also open a frontend component through a client action.

When developing menu navigation, consider the menu hierarchy, action reference, user permissions, and applicable access rules. The menu itself is a navigation mechanism rather than a separate ir.actions.* action subtype.

10. Actions Returned From Python Methods

Odoo button methods can return action descriptions as Python dictionaries. The web client interprets the returned value and performs the requested action, provided the response follows the expected format for that Odoo version.

A method may return a window action to open a particular record, a client action to display a custom interface, or another supported action descriptor.

A simplified example of returning a window action is shown below:

def action_open_partner(self):
    self.ensure_one()

    return {
        "type": "ir.actions.act_window",
        "name": "Customer",
        "res_model": "res.partner",
        "views": [[False, "form"]],
        "res_id": self.partner_id.id,
        "target": "current",
    }

This example assumes the model has a valid partner_id field and that the user has appropriate access to the linked customer record. Adapt the method to the actual model and requirements before using it in a custom module.

11. Closing Dialogs and Returning No Action

In supported Odoo client flows, returning False from an action-related method can close an open dialog or indicate that no further action should be performed. This is a response behavior, not a separate action model.

For example, a wizard may complete its operation and close without opening another view. The correct return value depends on the button flow and the Odoo version.

Test dialog behavior in the intended interface, especially when a wizard modifies records or returns a follow-up action.

12. How These Odoo Action Mechanisms Work Together

Odoo actions are often used together to complete a business process. Understanding their roles helps developers choose the correct implementation rather than creating unnecessary custom code.

Mechanism Primary Purpose Example
Window ActionOpen model viewsDisplay customer records
Server ActionExecute configured server-side operationsUpdate selected records
URL ActionNavigate to a URLOpen an external service
Client ActionLaunch frontend behaviorDisplay a custom dashboard
Report ActionGenerate or display reportsPrint a quotation
Scheduled ActionRun recurring jobsProcess scheduled tasks
Automated ActionReact to configured record events or conditionsTrigger a follow-up operation
Action BindingExpose an action in a contextual menuShow a report under Print
Menu ItemProvide application navigationOpen a model from an app menu
Python-Returned ActionTell the client what to do nextOpen a related customer form
Dialog Close ResponseClose a supported dialog flowFinish a wizard

Important Considerations When Developing Odoo Actions

  • Version compatibility: Verify field names, XML definitions, return formats, and frontend APIs for the Odoo version being used.
  • Access rights: Ensure the action respects appropriate model access controls and record rules.
  • Context and domain: Pass only required context values and use correct domain expressions.
  • Performance: Avoid unnecessary repeated searches, expensive computations, and unbounded processing.
  • Error handling: Provide useful feedback and design recurring jobs to recover safely from failures.
  • Testing: Test actions with intended user roles and realistic business records before deployment.
  • Maintainability: Prefer clear, documented implementations over unnecessary custom behavior.

Frequently Asked Questions About Actions in Odoo

What are actions in Odoo?

Actions define what Odoo should do in response to a menu selection, button, report request, or other supported interaction. They can open views, execute server-side operations, navigate to URLs, invoke client-side behavior, or generate reports.

How many core action types are there in Odoo?

Odoo's core action framework has five main ir.actions.* types: window, URL, server, report, and client actions. Scheduled actions use the separate ir.cron model. Other mechanisms, including automated actions, bindings, and menu items, are related but are not additional core action subtypes.

What is the difference between a server action and a window action?

A server action executes a configured server-side operation. A window action opens a model view so users can work with records. The correct choice depends on whether the requirement involves processing data or displaying a view.

What is the purpose of ir.actions.act_window?

ir.actions.act_window defines a window action that opens views for a specified model. It can include settings such as view modes, context, domain, and other view-related configuration.

What is the difference between ir.cron and automated actions?

ir.cron is used for scheduled jobs that run according to a configured schedule. Automated action rules generally respond to configured events or conditions. Available triggers and settings depend on the Odoo version.

Can developers create custom actions in Odoo?

Yes. Developers can create or extend actions through supported models, XML definitions, Python methods, and frontend implementations. The approach depends on the desired behavior and the APIs available in the target version.

Where can I find actions in Odoo?

With developer mode enabled and the necessary permissions, relevant action records may be accessible under Settings and the Technical menus. The exact menu location and available records can vary between Odoo versions.

What is an action binding in Odoo?

An action binding associates an action with a model so users can access it through relevant contextual menus, such as Action or Print, where supported.

Are automated actions the same as server actions?

No. Server actions define operations that can be executed on the server. Automated action rules define when supported operations should be triggered by configured record events or conditions.

Need Help With Odoo Development or Customization?

Globalteckz offers Odoo-related development and implementation services. Discuss your technical requirements, custom workflows, reports, and integrations with the team.

Explore Odoo Development Odoo Customization Services

Email: sales@globalteckz.com

In this blog post, we are going to know about the different types of actions in odoo 13. Actions are done by the users and the system gives some response based on user action, these responses are actually known as actions. Actions in Odoo ERP actually defines the behavior of the system in response to user actions for example : a login done by the user, action button, selection of an invoice, and so on…

There are a various number of actions in Odoo ERP software which is as follows:

1) Server Actions (ir.actions.server)

2) Window Actions (ir.actions.act_window)

3) URL Actions (ir.actions.act_url)

4) Client Actions (ir.actions.client)

5) Report Actions (ir.actions.report)

6) Automated Actions (ir.cron)

All these actions are stored in the database and when we call a method like a button method which refers to actions it returns directly as dictionaries.

We can see all user-defined actions from Settings -> Technical -> Actions.

creating actions in Odoo from settings

In the action creation form, there are two mandatory char fields are there.

  1. Name: Name of the action, it display on the client interface.
  2. Action Type: Action type is Where we define the type or category of the current action.

These are the two mandatory attributes and we have a number of optional argument are like,

res_model, binding_model_id, binding_view_types, view_id, view_ids, view_mode, view_type, search_view_id, state, code, domain, context, target etc.

  1. Server Actions (ir.actions.server)

This odoo action triggers the server code. It is helped to execute various types of actions automatically.

The available server actions are :

* Execute Python Code: Written python code that will be executed

* Create a new Record: Create a new record with values.

* Write on a Record: Update the record values.

* Execute several actions: Which trigger several server actions.

model_id : Model refers to this action.

binding_model_id : It defines which model is bound to this action.

binding_view_types : Mostly list / form is used to represent this field.

state: Options are,

* code: Executes python code given in the argument  of code.

* object_create: It creates a new record.

* object_write: Update the current record.

* multi: Executes several actions given in the argument of child_ids.

code: Used to write python code and execute this code when the action is occur.

Example

xml:

server actions in Odoo erp

This will execute the method action_test_code() in the model test model.

For more details you can refer How to Create Server Actions in Odoo blog.

  1. Window Actions (ir.actions.act_window)

This is the most common type action, it triggers a different view of the model and in other words it is  used to visualize the models with different types of views.

xml:

res_model : Model for representing this action window.

res_id : It is used to pass the active id of res_model.

view_mode : List of view types separated by commas(no spaces), ie, kanban, tree, form.

view_id : Provide the default view type will be open when the action is executed. If there is nothing it will open the window with the view of first type in the view_mode.

view_ids : We can define specific views for specific view_mode.

search_view_id : Setting the default search view for the object.

context : Used to pass additional context data passed to view.

domain : Condition used to filter the data passed to view.

target : We can define different options for target windows.

* new : It opens a window with a new address and edit mode(as when creating wizards) .

* current : It opens the regular form views.

* fullscreen : It will open the window in fullscreen mode.

* main : Without breadcrumb, it opens the main content area.

* inline : It will open the window in edit mode.

Example: A wizard will open while clicking a button.

py:

py file action in odoo

  1. URL Actions (ir.actions.act_url)

This action used to open a URL(website/web page).

xml:

url actions in odoo

py :

There is two important customized fields are,

url : The opened url when activating the action.

target : Types of target windows for url action.

* self : It opens the current window with current content.

* new : It redirects to the address with a new window.

  1. Client Actions (ir.actions.client)

It triggers the client implemented actions.One can create client actions as per our needs. Basically these actions are defined as menu_items in xml and it mapped to a widget.

Example:

Xml:

client actions in odoo

Then we need to create a widget in js with name as pdf_report_page.

tag: Which is an arbitrary string for which the client can identify the action.

params : It is a python dictionary with additional data to the client.

target: Options are,

* current : It opens the main content area.

* new: It will open a window  like dialog/popup.

* fullscreen: It will open a window in fullscreen mode.

* main: It will open the main content area without breadcrumbs.

  1. Report Actions (ir.actions.report)

It mainly triggers the printing of Report action.

reports actions in odoo

name : Name of report action.

Model : The model of report will be about.

report_type : qweb-html and qweb-pdf (for HTML and for PDF reports )

report_name : Report name.

groups_id : Group allowed for the current report.

paperformat_id : Field to specify the paper format for the report. It is a many to many field.

attachment : Where we can define a python expression(name of the report).

attachment_use : It is set to true when the reports must be generated once and we can reprint the stored report instead of generating every time.

Example: A button with ‘ir.actions.report’ type returns a dictionary. The name of the report referred by report_name and data of the current record is stored in the variable named datas.

report actions in odoo erp

Example: A button with ‘ir.actions.report’ type returns a dictionary. The name of the report referred by report_name and data of the current record is stored in the variable named datas.

About Globalteckz:

At Globalteckz we offer our clients with world class Business and Enterprise solutions. We are presence in India, USA, &  Canada, and have successfully offered end to end solutions to our clients. Some of our services offering include leading Open Source Solutions such as Odoo, Magento, and others ecommerce development. We deliver excellence and quality for Information Technology & Software Solutions to our clients worldwide.

For questions on Odoo pricing and cost that can involve with your business you can contact our sales team on sales@globalteckz.com

Read more articles related to Odoo Pricing :

Leave Comment