コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
7426 ビュー

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?

関連投稿 返信 ビュー 活動
2
11月 22
7160
1
9月 23
1950
1
5月 21
15868
1
4月 21
4590
0
8月 20
3208