I need XML file for
how I can inherit my new module from products to have all products features and add menu inside sales module in this structure::
sales - products -my_module
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I need XML file for
how I can inherit my new module from products to have all products features and add menu inside sales module in this structure::
sales - products -my_module
Hi,
You can define a new menu inside your xml file like this,
<menuitem id="menu_test_translation_import"
name="Test translation import"
action="action_test_translation_import"
parent="menu_test_translation"/>
The above code will add a new menu under the specified parent menu, the parent for a menu is specified using the parent="" along with the menu item. Suppose of you need to add a new menu under and existing menu, first of all you have to get the external ID of the existing menu and then you can specify it as parent of newly creating menu.
To Get external ID of existing menu, see this: https://www.youtube.com/watch?v=rK5Qe8mA89Q
Then, you have to define the action for the menu, either you can create a new action or specify the existing action. For creating new action,
<record id="action_test_translation_import" model="ir.actions.act_window">
<field name="name">Test translation import</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">test.translation.import</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="target">current</field>
</record>
Suppose if you need to use any existing action, you can do that too by the external id, suppose if you need to show products on clicking your menu, you can use the action given for the product menu, to get the ID of the action, activate the developer mode, navigate to Settings -> Technical -> User Interface -> Menu Items, search for product menu and open it, now you can see a field named Action, click the record and open it and get external id from there as shown in video.
Then specify it in your menu in actions=""
If you are new to Odoo and like to learn Odoo development , see this: https://www.youtube.com/watch?v=Tdg4YQowXyI&list=PLqRRLx0cl0hoJhjFWkFYowveq2Zn55dhM&index=3
Thanks
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Jan 24
|
6546 | ||
|
2
Jan 23
|
3210 | ||
|
1
Feb 22
|
2168 | ||
|
5
Apr 25
|
1951 | ||
|
1
Mar 24
|
3591 |
How to create Action Menu in Odoo: https://goo.gl/UnHzS8