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

I have a problem when trying to replace div that is related to other div will inherits 

my code as following :

xml version="1.0" encoding="UTF-8"?><templatesid="pos_custom"xml:space="preserve">
<tt-inherit="point_of_sale.OrderReceipt"t-inherit-mode="extension"owl="1">
    <xpathexpr="//div[hasclass('pos-receipt-contact')]"position="replace">               <p>Success !p>    xpath>   t>templates>

my log error : 
ValueError: Element '' cannot be located in parent view - - -2022-07-2808:05:21,977351769INFO ? werkzeug: 192.168.0.61 - - [28/Jul/202208:05:21] "GET /web/static/lib/stacktracejs/stacktrace.js HTTP/1.1"200 - - - -2022-07-2808:05:21,993351769INFO newestDB07021 werkzeug: 192.168.0.61 - - [28/Jul/202208:05:21] "GET /web/webclient/locale/en_US HTTP/1.1"200 - 10.0010.0042022-07-2808:05:22,057351769INFO newestDB07021 werkzeug: 192.168.0.61 - - [28/Jul/202208:05:22] "GET /web/assets/debug/web.assets_backend_prod_only.js HTTP/1.1"200 - 30.0030.0582022-07-2808:05:22,057351769INFO newestDB07021 werkzeug: 192.168.0.61 - - [28/Jul/202208:05:22] "GET /web/assets/debug/web.assets_backend.js HTTP/1.1"200 - 30.0020.061

아바타
취소
베스트 답변

Hi,

Try this:

<?xml version="1.0" encoding="utf-8"?>
<templates id="template" xml:space="preserve">
<t t-name="pos_custom" t-inherit="point_of_sale.ReceiptHeader" t-inherit-mode="extension">
<xpath expr="//div[hasclass('pos-receipt-contact')]" position="replace">

                   <p>Success !p>

</xpath>


Hope it helps

아바타
취소

It work ok, thanks Cybrosys

관련 게시물 답글 화면 활동
0
1월 23
9
1
11월 22
3013
2
7월 22
2620
1
6월 22
2138
1
4월 22
3830