See also

Refer to the following to learn more about menus and views:

  • You'll find a more detailed discussion of the XML ID reference mechanism in Chapter 7, Module Data. For now, just keep in mind that you can set references this way and, importantly, that order matters. If the preceding tags were inverted, the add-on that contains this XML code wouldn't install, because the menuitem would refer to an unknown action.
This can be a pitfall when you add new data files and new elements during your development process, because then the order in which you add those files and elements does not necessarily reflect the order in which they will be loaded in an empty database. Always check, before deployment, whether your add-on installs in an empty database without errors.
  • The ir.actions.act_window action type is the most common action type, but a menu can refer to any type of action. Technically, it is the same if you link to a client action, a server action, or any other model defined in the ir.actions.* namespace. It just differs in what the backend makes out of the action.
  • If you need just a tiny bit more flexibility in the concrete action to be called, look into server actions that return a window action. If you need complete flexibility, take a look at the client actions (ir.actions.client), which allow you to have a completely custom user interface. However, only do this as a last resort as you lose a lot of Odoo's convenient helpers when using them.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset