Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
7416 Näkymät

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
Hylkää
Paras vastaus

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
Hylkää
Tekijä

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?

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
marrask. 22
7152
1
syysk. 23
1949
1
toukok. 21
15868
1
huhtik. 21
4584
0
elok. 20
3201