Skip to Content
Menu
This question has been flagged
1 Reply
2256 Views

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

Avatar
Discard
Best Answer

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

Avatar
Discard

It work ok, thanks Cybrosys

Related Posts Replies Views Activity
0
Jan 23
9
1
Nov 22
2405
2
Jul 22
2121
1
Jun 22
1621
1
Apr 22
3369