Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
7351 มุมมอง

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
7045
1
ก.ย. 23
1847
1
พ.ค. 21
15778
1
เม.ย. 21
4434
0
ส.ค. 20
3096