Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
1968 Tampilan

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
Buang
Jawaban Terbai

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
Buang

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 Terkait Replies Tampilan Aktivitas
3
Jul 17
10488
1
Apr 15
13070
1
Feb 16
3648
13
Des 23
32578
3
Jan 25
14686