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

Im trying to create a new header for a theme and to do so im following the odoo documentation v16:

https://www.odoo.com/documentation/16.0/developer/howtos/website_themes/layout.html

This is a picture from the odoo docs:

The issue is that I write the same thing as this photo and them I get an xpath error.


Does anybody know why? any help is welcome :)

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

Hi, This error is arising because you are trying to inherit the wrong record view. So Odoo is unable to locate the specified element in the parent view specified by the XPath expression.
1) Ensure that the parent view specified in the XPath expression exists and has the expected structure.
2) If the parent view is a template or inherits from another view, ensure that the target element is present in the appropriate section or location within the parent view.3) If you're referencing views or elements from other modules, ensure that the necessary dependencies are correctly specified in your module's manifest file (__manifest__.py).
4) Verify that the module containing the parent view is installed and properly configured.


Hope it helps

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

OKey, I solved by coping a template of any team inside odoo, doing the module with a name diferent than theme_something and it worked.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 25
500
1
thg 7 25
436
2
thg 1 25
2262
0
thg 1 24
1778
0
thg 12 23
2418