Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2117 Widoki

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?  

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć

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>

Powiązane posty Odpowiedzi Widoki Czynność
3
lip 17
10579
1
kwi 15
13175
1
lut 16
3745
13
gru 23
32698
3
sty 25
14824