Skip to Content
Menu
This question has been flagged
1778 Views

When a purchase is made on our store we get the following error.

note -

- sale does complete and client receives receipt from payment acquirer as well as automatic email product template 

- we updated all module, 

- we also updated Odoo14 from github

-----

500: Internal Server Error

QWeb

Error message:

load could not load template
ValueError: Element '' cannot be located in parent view

View name: external_layout_background
Error context:
 view: ir.ui.view(217,)
 xmlid: web.external_layout_background
 view.parent: ir.ui.view(3292,)

Template: web.external_layout
Path: /t/t[3]

The error occured while rendering the template web.external_layout

-----

Here is the traceback

Traceback (most recent call last):
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odoo14/odoo/odoo/http.py", line 808, in dispatch
    r = self._call_function(**self.params)
  File "/opt/odoo14/odoo/odoo/http.py", line 361, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo14/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo14/odoo/odoo/http.py", line 349, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo14/odoo/odoo/http.py", line 914, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo14/odoo/odoo/http.py", line 533, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo14/odoo/addons/website_sale/controllers/main.py", line 1046, in payment_validate
    order.with_context(send_email=True).action_confirm()
  File "/opt/odoo14/odoo/addons/sale_crm/models/sale_order.py", line 15, in action_confirm
    return super(SaleOrder, self.with_context({k:v for k,v in self._context.items() if k != 'default_tag_ids'})).action_confirm()
  File "/opt/odoo14/odoo/addons/event_sale/models/sale_order.py", line 22, in action_confirm
    res = super(SaleOrder, self).action_confirm()
  File "/opt/odoo14/odoo/addons/website_sale/models/sale_order.py", line 359, in action_confirm
    order._send_order_confirmation_mail()
  File "/opt/odoo14/odoo/addons/sale/models/sale.py", line 902, in _send_order_confirmation_mail
    order.with_context(force_send=True).message_post_with_template(template_id, composition_mode='comment', email_layout_xmlid="mail.mail_notification_paynow")
  File "/opt/odoo14/odoo/addons/mass_mailing/models/mail_thread.py", line 37, in message_post_with_template
    return super(MailThread, no_massmail).message_post_with_template(template_id, **kwargs)
  File "/opt/odoo14/odoo/addons/mail/models/mail_thread.py", line 1973, in message_post_with_template
    update_values = composer.onchange_template_id(template_id, kwargs['composition_mode'], self._name, res_id)['value']
  File "/opt/odoo14/odoo/addons/mail/wizard/mail_compose_message.py", line 382, in onchange_template_id
    values = self.generate_email_for_composer(
  File "/opt/odoo14/odoo/addons/mail/wizard/mail_compose_message.py", line 516, in generate_email_for_composer
    template_values = self.env['mail.template'].with_context(tpl_partners_only=True).browse(template_id).generate_email(res_ids, fields)
  File "/opt/odoo14/odoo/addons/account_edi/models/mail_template.py", line 21, in generate_email
    res = super().generate_email(res_ids, fields)
  File "/opt/odoo14/odoo/addons/mail/models/mail_template.py", line 214, in generate_email
    result, format = report._render_qweb_pdf([res_id])
  File "/opt/odoo14/odoo/addons/account/models/ir_actions_report.py", line 50, in _render_qweb_pdf
    return super()._render_qweb_pdf(res_ids=res_ids, data=data)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_actions_report.py", line 820, in _render_qweb_pdf
    html = self_sudo.with_context(context)._render_qweb_html(res_ids, data=data)[0]
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_actions_report.py", line 861, in _render_qweb_html
    return self._render_template(self.report_name, data), 'html'
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_actions_report.py", line 597, in _render_template
    return view_obj._render_template(template, values)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_ui_view.py", line 1708, in _render_template
    return self.browse(self.get_view_id(template))._render(values, engine)
  File "/opt/odoo14/odoo/addons/website/models/ir_ui_view.py", line 420, in _render
    return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/opt/odoo14/odoo/addons/web_editor/models/ir_ui_view.py", line 28, in _render
    return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_ui_view.py", line 1716, in _render
    return self.env[engine]._render(self.id, qcontext)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_qweb.py", line 55, in _render
    result = super(IrQWeb, self)._render(id_or_xml_id, values=values, **context)
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 258, in _render
    self.compile(template, options)(self, body.append, values or {})
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    raise e
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "", line 1, in template_sale_report_saleorder_4077
  File "", line 2, in body_call_content_4075
  File "", line 3, in foreach_4074
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    raise e
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "", line 1, in template_sale_report_saleorder_document_4128
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    raise e
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "", line 1, in template_web_external_layout_4172
  File "", line 2, in compile
  File "/opt/odoo14/odoo/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_qweb.py", line 110, in compile
    return super(IrQWeb, self).compile(id_or_xml_id, options=options)
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 275, in compile
    element, document = self.get_template(template, options)
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 363, in get_template
    raise QWebException("load could not load template", e, path, name=template)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odoo14/odoo/odoo/http.py", line 808, in dispatch
    r = self._call_function(**self.params)
  File "/opt/odoo14/odoo/odoo/http.py", line 361, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo14/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo14/odoo/odoo/http.py", line 349, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo14/odoo/odoo/http.py", line 914, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo14/odoo/odoo/http.py", line 533, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo14/odoo/addons/website_sale/controllers/main.py", line 1046, in payment_validate
    order.with_context(send_email=True).action_confirm()
  File "/opt/odoo14/odoo/addons/sale_crm/models/sale_order.py", line 15, in action_confirm
    return super(SaleOrder, self.with_context({k:v for k,v in self._context.items() if k != 'default_tag_ids'})).action_confirm()
  File "/opt/odoo14/odoo/addons/event_sale/models/sale_order.py", line 22, in action_confirm
    res = super(SaleOrder, self).action_confirm()
  File "/opt/odoo14/odoo/addons/website_sale/models/sale_order.py", line 359, in action_confirm
    order._send_order_confirmation_mail()
  File "/opt/odoo14/odoo/addons/sale/models/sale.py", line 902, in _send_order_confirmation_mail
    order.with_context(force_send=True).message_post_with_template(template_id, composition_mode='comment', email_layout_xmlid="mail.mail_notification_paynow")
  File "/opt/odoo14/odoo/addons/mass_mailing/models/mail_thread.py", line 37, in message_post_with_template
    return super(MailThread, no_massmail).message_post_with_template(template_id, **kwargs)
  File "/opt/odoo14/odoo/addons/mail/models/mail_thread.py", line 1973, in message_post_with_template
    update_values = composer.onchange_template_id(template_id, kwargs['composition_mode'], self._name, res_id)['value']
  File "/opt/odoo14/odoo/addons/mail/wizard/mail_compose_message.py", line 382, in onchange_template_id
    values = self.generate_email_for_composer(
  File "/opt/odoo14/odoo/addons/mail/wizard/mail_compose_message.py", line 516, in generate_email_for_composer
    template_values = self.env['mail.template'].with_context(tpl_partners_only=True).browse(template_id).generate_email(res_ids, fields)
  File "/opt/odoo14/odoo/addons/account_edi/models/mail_template.py", line 21, in generate_email
    res = super().generate_email(res_ids, fields)
  File "/opt/odoo14/odoo/addons/mail/models/mail_template.py", line 214, in generate_email
    result, format = report._render_qweb_pdf([res_id])
  File "/opt/odoo14/odoo/addons/account/models/ir_actions_report.py", line 50, in _render_qweb_pdf
    return super()._render_qweb_pdf(res_ids=res_ids, data=data)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_actions_report.py", line 820, in _render_qweb_pdf
    html = self_sudo.with_context(context)._render_qweb_html(res_ids, data=data)[0]
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_actions_report.py", line 861, in _render_qweb_html
    return self._render_template(self.report_name, data), 'html'
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_actions_report.py", line 597, in _render_template
    return view_obj._render_template(template, values)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_ui_view.py", line 1708, in _render_template
    return self.browse(self.get_view_id(template))._render(values, engine)
  File "/opt/odoo14/odoo/addons/website/models/ir_ui_view.py", line 420, in _render
    return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/opt/odoo14/odoo/addons/web_editor/models/ir_ui_view.py", line 28, in _render
    return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_ui_view.py", line 1716, in _render
    return self.env[engine]._render(self.id, qcontext)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_qweb.py", line 55, in _render
    result = super(IrQWeb, self)._render(id_or_xml_id, values=values, **context)
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 258, in _render
    self.compile(template, options)(self, body.append, values or {})
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    raise e
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "", line 1, in template_sale_report_saleorder_4077
  File "", line 2, in body_call_content_4075
  File "", line 3, in foreach_4074
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    raise e
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "", line 1, in template_sale_report_saleorder_document_4128
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    raise e
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "", line 1, in template_web_external_layout_4172
  File "", line 2, in compile
  File "/opt/odoo14/odoo/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_qweb.py", line 110, in compile
    return super(IrQWeb, self).compile(id_or_xml_id, options=options)
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 275, in compile
    element, document = self.get_template(template, options)
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 363, in get_template
    raise QWebException("load could not load template", e, path, name=template)
odoo.addons.base.models.qweb.QWebException: Element '' cannot be located in parent view

View name: external_layout_background
Error context:
 view: ir.ui.view(217,)
 xmlid: web.external_layout_background
 view.parent: ir.ui.view(3292,)

Traceback (most recent call last):
  File "/opt/odoo14/odoo/odoo/addons/base/models/qweb.py", line 357, in get_template
    document = options.get('load', self._load)(template, options)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_qweb.py", line 119, in _load
    template = env['ir.ui.view'].sudo()._read_template(view_id)
  File "", line 2, in _read_template
  File "/opt/odoo14/odoo/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_ui_view.py", line 1573, in _read_template
    arch = self.browse(view_id).read_combined(['arch'])['arch']
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_ui_view.py", line 809, in read_combined
    arch = root.apply_view_inheritance(arch_tree, self.model)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_ui_view.py", line 750, in apply_view_inheritance
    return self._apply_view_inheritance(source, inherit_tree)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_ui_view.py", line 759, in _apply_view_inheritance
    source = view._apply_view_inheritance(source, inherit_tree)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_ui_view.py", line 758, in _apply_view_inheritance
    source = view.apply_inheritance_specs(source, arch_tree)
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_ui_view.py", line 735, in apply_inheritance_specs
    self.handle_view_error(str(e))
  File "/opt/odoo14/odoo/odoo/addons/base/models/ir_ui_view.py", line 673, in handle_view_error
    raise ValueError(formatted_message).with_traceback(from_traceback) from from_exception
ValueError: Element '' cannot be located in parent view

View name: external_layout_background
Error context:
 view: ir.ui.view(217,)
 xmlid: web.external_layout_background
 view.parent: ir.ui.view(3292,)


load could not load template
ValueError: Element '' cannot be located in parent view

View name: external_layout_background
Error context:
 view: ir.ui.view(217,)
 xmlid: web.external_layout_background
 view.parent: ir.ui.view(3292,)

Template: web.external_layout
Path: /t/t[3]



Avatar
Discard
Related Posts Replies Views Activity
5
Nov 22
2027
0
Feb 22
1386
0
Dec 21
902
0
Nov 21
876
0
Sep 21
1108