콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
3087 화면

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>

아바타
취소
베스트 답변

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

아바타
취소
관련 게시물 답글 화면 활동
2
7월 23
6442
1
6월 23
4386
1
4월 23
5115
1
11월 22
3806
1
1월 22
4559