Window Actions and Menu Items in Odoo

A menu item lets a user reach a kind of record. Window actions and menu items are how.

A developer can define a model and its views, but a user also needs a way to reach those records. Window actions and menu items provide it. This piece is about them in Odoo.

The need to reach records

A developer who has defined a model, the kind of record, and built its views, the ways the records are presented, has the records and the means of presenting them, but a user also needs a way to get to them: a way, in Odoo, to reach the records of that kind and start working with them. That way is provided through the menus, and window actions and menu items are how.

What a menu item is

A menu item, in Odoo, is an entry in the menus, the navigation, that a user can use. The menus are how a user finds their way around Odoo and reaches the things they want to work with, and a menu item is an entry in that navigation. To give users a way to reach a kind of record, the developer provides a menu item for it, an entry in the menus that the user uses to get to those records.

What a window action is

A menu item is the entry the user uses; a window action is, in effect, what the menu item does, what genuinely happens when it is used. A window action is what opens up the records, bringing the user to the kind of record, presented in its views, ready to work with. So a menu item and a window action go together: the menu item is the entry in the navigation, and the window action is what it does, opening the records for the user. Together they are how a user, through the menus, genuinely reaches a kind of record.

Providing the way to records

So, for a developer who has built a new kind of record, model and views, providing window actions and menu items is the step that makes the records reachable: the menu item gives the user an entry in the navigation, and the window action it triggers brings the user to the records, in their views. Without this, the records and views exist but the user has no way to get to them. Window actions and menu items complete the new functionality by giving users the way to reach it.

Menu items should be sensible

An honest note. A menu item is part of the navigation, and the navigation should be sensible and clear, as covered in considering website and Odoo navigation generally. A developer adding a menu item should add it sensibly: in a sensible place in the menu structure, clearly labelled, so it genuinely helps users find the records. Menu items added thoughtlessly clutter the navigation; menu items added sensibly genuinely give users clear ways to reach what they need. Add menu items as a sensible part of the navigation.

The takeaway

Window actions and menu items in Odoo give users a way, through the menus, to reach a kind of record. A menu item is an entry in the navigation that a user uses; a window action is what the menu item does, opening up the records, bringing the user to them in their views. Together they make a kind of record reachable, completing new functionality, model and views, by giving users the way to get to it. Add menu items sensibly, as a clear part of the navigation. For how we approach Odoo, see our ERP practice.

All posts

Got a Topic Worth Posting?

Suggest a Topic

If a question keeps coming up in your operations, it might be worth its own post.