Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2188 Visualizzazioni

So I am trying to replace the billing element and the shipping element. 


I wrote this code 


But it constantly returns this error message 


Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/http.py", line 1764, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/home/odoo/src/odoo/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/home/odoo/src/odoo/odoo/http.py", line 1791, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/home/odoo/src/odoo/odoo/http.py", line 1908, in dispatch
    return self.request.registry['ir.http']._dispatch(endpoint)
  File "/home/odoo/src/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
    response = super()._dispatch(endpoint)
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 224, in _dispatch
    result.flatten()
  File "/home/odoo/src/odoo/odoo/http.py", line 1313, in flatten
    self.response.append(self.render())
  File "/home/odoo/src/odoo/odoo/http.py", line 1305, in render
    return request.env["ir.ui.view"]._render_template(self.template, self.qcontext)
  File "/home/odoo/src/odoo/addons/website/models/ir_ui_view.py", line 442, in _render_template
    return super()._render_template(template, values=values)
  File "/home/odoo/src/enterprise/web_studio/models/ir_ui_view.py", line 1310, in _render_template
    return super(View, self)._render_template(template, values)
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_ui_view.py", line 2053, in _render_template
    return self.env['ir.qweb']._render(template, values)
  File "/home/odoo/src/odoo/odoo/tools/profiler.py", line 292, in _tracked_method_render
    return method_render(self, template, values, **options)
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_qweb.py", line 598, in _render
    rendering = render_template(irQweb, values)
  File "", line 5, in not_found_template
ValueError: Element „“Cannot be localized in the parent view.


Does anybody have any ideas?  

Avatar
Abbandona
Risposta migliore

Hello David Hovsepian,


To replace the billing element and the shipping element, you can try below xpath,


//Code in Comment//


Hope this Helps,

If you need any help in customization feel free to contact us.


Thanks & Regards,

Email:  odoo@aktivsoftware.com           

Skype: kalpeshmaheshwari

Avatar
Abbandona

Code:

<template id="custom_template" inherit_id="website_sale.checkout">
<xpath expr="//div//h4" position="replace">
<h4>Custom Billing</h4>
</xpath>
<xpath expr="//t[5]/div[1]//h4" position="replace">
<h4>Custom shipping</h4>
</xpath>
</template>

Post correlati Risposte Visualizzazioni Attività
3
lug 17
10632
1
apr 15
13265
1
feb 16
3789
13
dic 23
32755
3
gen 25
14876