콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
7456 화면

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
7246
1
9월 23
2006
1
5월 21
15914
1
4월 21
4669
0
8월 20
3274