Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2816 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează

It work ok, thanks Cybrosys

Related Posts Răspunsuri Vizualizări Activitate
0
ian. 23
9
1
nov. 22
2925
2
iul. 22
2526
1
iun. 22
2052
1
apr. 22
3731