Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
7418 Представления

Hello. I made a small widget that adds a small red bar to the top of a view form, the code can be found in this imgur gallery: https://imgur.com/a/R5TfxpJ

When I try to install my module, Odoo throws me an error: 

Element '<xpath expr="//div[hasclass('o_form_sheet_bg')]">' cannot be located in parent view

Is it possible to display my widget without inheriting the stock.picking form view? I just want it to show up on top of it.


Аватар
Отменить
Лучший ответ

Hi,

Please try replace your 'xpath' expression to something similiar to the following. 
<xpath expr="/form/header" position="before">
<!-- add your widget here -->
</xpath>


Thanks

Аватар
Отменить
Автор

Thank you. This actually does the same thing as //header, which isn't really what I want. Do you know how to insert the widget before the save/discard buttons? Just under the purple odoo navbar?

Related Posts Ответы Просмотры Активность
2
нояб. 22
7154
1
сент. 23
1949
1
мая 21
15868
1
апр. 21
4586
0
авг. 20
3201