Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5945 Lượt xem

Hello,

I was trying to inherit main website layout menu (header navigation bar). Is there is any way to within new module to add new menu items? instead of doing it from the front end?

Any example and help would be appreciate

 

Regards

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello,


You just need to create a record which create a website.menu record in your new module with parent_id=ref('website.main_menu') as record.

The xml record example is this:


https://github.com/odoo/odoo/blob/8.0/addons/website/data/data.xml#L16

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 12 22
22889
Qweb Inheritance Đã xử lý
3
thg 11 19
7729
2
thg 1 24
1388
2
thg 12 21
22395
1
thg 9 20
7471