I am using odoo 15 ; I am customizing receipt in point_of_sale module I have a problem when trying to replace div( have a class related to other div inherits the same templates)
my code as following :
<xml version="1.0" encoding="UTF-8"?>
<templates id="pos_custom"xml:space="preserve">
<t t-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 '<xpath expr="//div[hasclass('pos-receipt-contact')]">' cannot be located in parent view - - -
2022-07-28 08:05:21,977 351769 INFO ? werkzeug: 192.168.0.61 - - [28/Jul/2022 08:05:21] "GET /web/static/lib/stacktracejs/stacktrace.js HTTP/1.1" 200 - - - -
2022-07-28 08:05:21,993 351769 INFO newestDB07021 werkzeug: 192.168.0.61 - - [28/Jul/2022 08:05:21] "GET /web/webclient/locale/en_US HTTP/1.1" 200 - 1 0.001 0.004
2022-07-28 08:05:22,057 351769 INFO newestDB07021 werkzeug: 192.168.0.61 - - [28/Jul/2022 08:05:22] "GET /web/assets/debug/web.assets_backend_prod_only.js HTTP/1.1" 200 - 3 0.003 0.058
2022-07-28 08:05:22,057 351769 INFO newestDB07021 werkzeug: 192.168.0.61 - - [28/Jul/2022 08:05:22] "GET /web/assets/debug/web.assets_backend.js HTTP/1.1" 200 - 3 0.002 0.061