Skip to Content
Menú
This question has been flagged
1 Respondre
7391 Vistes

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.


Avatar
Descartar
Best Answer

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

Avatar
Descartar
Autor

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 Respostes Vistes Activitat
2
de nov. 22
7101
1
de set. 23
1913
1
de maig 21
15845
1
d’abr. 21
4533
0
d’ag. 20
3156