Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1940 มุมมอง

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?  

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง

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>

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.ค. 17
10482
1
เม.ย. 15
13045
1
ก.พ. 16
3640
13
ธ.ค. 23
32549
3
ม.ค. 25
14672