Step 5: Define Actions

Now the view have to be made available to the UI. This is done using menus.

Define menus

The application menu is also defined using xml definition. A menu item when clicked executes an action. The actions again have to be defined using xml.

The Axelor Open Platform supports several action types. The action-view can be used to define menu actions.

Let’s create an action and a menu item for the Contact object:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns=""

  <menuitem name="menu-contact-book"
            title="Address Book" /> (1)

  <menuitem name="menu-contact-friends"
            title="All Contact"
            action="contact.all"/> (2) (3) (4)

  <action-view name="contact.all"
               model=""> (5)
    <view type="grid" name="contact-grid"/> (6)
    <view type="form" name="contact-form"/> (7)

1 define a top-level menu with no parent
2 define a child menu item with parent
3 the display text of the menu item
4 the action (of type action-view) to execute
5 define an action-view for the given object
6 use the contact-grid view defined for the grid view
7 use the contact-form view defined for the form view

For more information on action-view see the Developer Guide.

What’s Next?

In this chapter we seen how to define menus. In the next chapter we will see how to configure the application properties like database connection etc.