Search code examples
xmlodooodoo-14

How do I add a new item under top level menu in Odoo 14?


I'm trying to add an option under the top menu in the "Inventory" screen. The other menus on top are "Overview", "Operations", "Products", "Reporting" and "Configuration" I need to add a new button under "Operations" entitled "Repack" for a module I'm working on. I've tried to simply add a new menuitem using:

    <menuitem id="repack" name="Repack" parent="stock.menu_stock_warehouse_mgmt"
          action="rumiano_test_action" sequence="10"/>

But I've had no luck, the new button doesn't display. Is there more to it than this? How's it done?

Many thanks in advance


Solution

  • Yes you are on right track, go to Settings > Technical > user interface > menu items, look for the menu you want to add under, in this case Operations, get the external id from View Metadata option. In this case will be stock.menu_stock_warehouse_mgmt which is correct. After module update, check for the added menu in same location Settings > Technical > user interface > menu items, look for the menu you have added, should be in the list. Even if then the menu is not appearing, check for the model permission, you must add at least read permission to user, the model which the action rumiano_test_action is related to.