Skip to Content
Menu
This question has been flagged
3 Replies
229 Zobrazenia

I use odoo19, Enterprise version and i want to create one menu in Products tab so how to create?
please give me guide 

Avatar
Zrušiť
Best Answer

Hello Naved Husain Shaikh,


You can easily achieve this using Odoo Studio by following these steps::

  1. Open Studio (wrench icon) with Sales app.

 

      2. Click on " Edit Menu ".

     

 

   3. Click on “New Menu” and enter the Menu Name and the Model it should relate to.

        For example, to create a new menu called “All Products” linked to the Product model, follow the example shown below.

 

Click on confirm. After confirming, you'll see your new menu appear at the end of all menus.

 

 

You can then change the sequence easily to adjust its position.


If you have any questions, feel free to reach out.


Hope this helps!


Thanks & Regards,

Email : odoo@aktivsoftware.com

Avatar
Zrušiť
Autor Best Answer

Sorry, I forget the explain. I want to customize only odoo studio, i do not want to use init, manifest etc..

Avatar
Zrušiť

Hello,
Click the Edit Menu button at the top-right corner. A pop-up window will appear. In that window, click New Menu at the bottom-right corner. Then, select the existing model and choose Product as the model. After adding menu you can adjust the sequence by dragging the menu.

Best Answer

Hi,


To create a new menu under the Products tab in Odoo 19 Enterprise, you first need a custom module (for example, product_custom_menu). Inside it, include essential files like __init__.py, __manifest__.py, and a views folder containing your menu XML file. In the manifest file, define the module’s details, add product as a dependency, and include your XML file in the data section.


Next, in the XML file (e.g., product_menu.xml), define your menu structure. Use the <menuitem> tag with parent="product.menu_products" to place your new menu under the existing Products tab. You can add a sub-menu with an action linked to a model or view, such as displaying a product list using the product.template model.


<?xml version="1.0" encoding="utf-8"?>

<odoo>

    <!-- Add a new menu under the main 'Products' menu -->

    <menuitem id="menu_product_custom_root"

              name="My Custom Menu"

              parent="product.menu_products"

              sequence="50"/>


    <!-- Example action (optional): open a list of products -->

    <record id="action_my_custom_product_list" model="ir.actions.act_window">

        <field name="name">My Custom Product List</field>

        <field name="res_model">product.template</field>

        <field name="view_mode">tree,form</field>

    </record>


    <!-- Submenu linked to the action -->

    <menuitem id="menu_product_custom_sub"

              name="Product List"

              parent="menu_product_custom_root"

              action="action_my_custom_product_list"

              sequence="1"/>

</odoo>


Finally, update your module in Odoo using the command line or the Odoo Apps interface, then install it. Once done, your new menu will appear under the Products tab, ready to open the linked model or view. Optionally, you can replace the product list with a custom model or dashboard view if desired.


Reference:

https://www.cybrosys.com/blog/how-to-define-menu-and-actions-in-odoo-19

https://www.youtube.com/watch?v=SNAxPiSZYQQ

https://www.cybrosys.com/blog/menu-submenu-and-action-in-odoo


Hope it helps

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
0
nov 25
3
1
nov 25
406
2
nov 25
815
2
nov 25
571
0
nov 25
3