コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1879 ビュー

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>

関連投稿 返信 ビュー 活動
3
7月 17
10418
1
4月 15
12978
1
2月 16
3594
13
12月 23
32418
3
1月 25
14581