This question has been flagged
1 Reply
1720 Views

I'm developing my company's website and I need to get the location (the file) of the layout where are the menu items coded.

I tried to search them via Google Developer Tools but I'm not able to locate de file.

This is the example of one menuitem of the menu, but I'm not able to find where is this code stored.

<span data-oe-model="website.menu" data-oe-id="6" data-oe-field="name" data-oe-type="char" data-oe-expression="submenu.name">Contact us</span>

Avatar
Discard
Best Answer

Hi,

It seems you are new to Odoo development. If you are going to build the website for your company either you can do it from the user interface using the odoo website builder or if you are technically sounded you can create a new module to add and design the website accordingly.

Odoo has got a module structure, if you check the odoo github repository, you can see lot of modules in it, each of the module adds a set of functionality to the system

Github: https://github.com/odoo/odoo

And by checking the odoo code you can see how the menu is added in the website, see a sample code of how the shop menu in the Ecomerce module is added:- 

<record id="menu_shop" model="website.menu">
<field name="name">Shop</field>
<field name="url">/shop</field>
<field name="parent_id" ref="website.main_menu"/>
<field name="sequence" type="int">20</field>
</record>

See the above code here: https://github.com/odoo/odoo/blob/13.0/addons/website_sale/data/data.xml

Also if you are going into development, you can set a development environment, then it will be easy to check the codes. Better to configure Odoo with Pycharm.

Odoo Development Tutorials: Odoo Development Tutorials

Thanks

Avatar
Discard