Windows Actions

Windows Action are an important element of the Odoo architecture.

They are primarily used with menus: each menu option is linked to a Windows Action (and in Odoo Studio, when you create a new menu an associated Windows Action will also be created).

Here’s one way to see how they are used:

As you will see, there is a lot of information for each Action (mandatory fields marked with *):

Windows Action for Quotations

Basic information

Action Name* (which will be shown at the top of the screen)

External ID (allocated by Odoo)

Object*

  • Every Windows Action is for one Model (database table). In this example it is sale.order (Quotations and Sales Orders)

Action Usage (optional text field)

Action Type (ir.actions_act_window)

Target Window*

  • Current Window (open in the main content area) (default)
  • New Window (in a dialog/popup).
  • Inline Edit (only used in Technical Settings)
  • Full Screen (full screen mode)
  • Main Action of Current Window (Open in the main content area and clear the “breadcrumbs“).

Help

This text is displayed if there are no records to display in the List View.

Views

View Mode*

This is a list of the Form Types that are available in this menu option. Must specify at least one, can select several (separated by commas). In the above example, seven view types have been selected.

  • tree
  • kanban
  • form
  • calendar
  • pivot
  • graph
  • activity

This can be seen in the top right corner of the screen:

6 view types are shown (Form View is not shown as an icon)

There are several other view types available (depending upon which version of Odoo).

View Ref.

Search View Ref – Select the Search View to be used

Filters

Domain Value (limits which records are displayed)

Context Value (various functions)

Limit – Can specify number of records to display initially (default 80)

Auto Search (True / False)

Filter (True / False)

Restrict to Lists (True / False)

Special

These only applies to Actions that are available from the ‘Action Menu’ (e.g. “Merge Contacts”)

Binding Type

  • Action
  • Form-only
  • Report

Binding Model

  • Specify the model (database table)

Views

This is optional, and can be used to override which Views will be used for this action. Below is one example where it is used:

No Form View is specified, so the standard one will be used.

Note that the available views are specified in View Mode

Security

It’s possible to restrict a Windows Action to selected User Access Groups, though is not used very often.

One example is that “Create a Sales Order” in the Project app is only available to Sales Users:

This makes sense, because if a user doesn’t have this authority they should not be able to create a sales order