Version: Odoo 17.0
I've been playing with odoo, and i want to add a link to a menu dropdown, i would like to add it to the Product menu in the inventory module.
After looking through the documentation, and looking at the code of the already present button i have created a module and installed it into odoo, i have tried with the following code in views/menus.xml, however no button is added to the menu.
This is my menu/views.xml
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<menuitem id="custom_menu_item_stock"
name="Test"
parent="stock.menu_stock_inventory_control"
action="custom_action_url"
sequence="10"/>
<record id="custom_action_url" model="ir.actions.act_url">
<field name="name">Custom Button URL</field>
<field name="url">https://www.example.com</field>
<field name="target">new</field>
</record>
</data>
</odoo>
and this is my __manifest__.py
{
'name': "my_module",
'summary': """
Short (1 phrase/line) summary of the module's purpose, used as
subtitle on modules listing or """,
'description': """
Long description of module's purpose
""",
'author': "My Company",
'website': "http://www.yourcompany.com",
'category': 'Uncategorized',
'version': '0.1',
# any module necessary for this one to work correctly
'depends': [
'base',
'stock'
],
# always loaded
'data': [
'views/menus.xml',
],
# only loaded in demonstration mode
'demo': [
],
}