0

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(&#39;pos-receipt-contact&#39;)]">' 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
user1261494
  • 139
  • 1
  • 10
  • 1
    don't replace. other views that are using this class, so they will generate this error because it no longer exists. To make it work, hide this view and append your code after this class – Muhammad Yusuf Jul 28 '22 at 12:41
  • Check the state of the report in the database. The DIV can be deleted by some other module or by manual editing. Your code seems ok. – Paxmees Jul 28 '22 at 20:01

0 Answers0