500: Internal Server Error
QWeb
Error message:
Error to render compiling AST AttributeError: 'str' object has no attribute 'id' Template: website_sale.products Path: /t/t/t[2]/div/div/div/ul/t/t/t[2] Node: <t t-set="catg_id" t-value="active_category.id if active_category else 0"/>
The error occured while rendering the template website_sale.products
and evaluating the following expression: <t t-set="catg_id" t-value="active_category.id if active_category else 0"/>
Traceback
Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_website_sale_products_10145 File "<template>", line 2, in body_call_content_10143 File "<template>", line 14, in foreach_10092 File "<template>", line 15, in body_call_content_10090 AttributeError: 'str' object has no attribute 'id' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/addons/base/models/ir_http.py", line 234, in _dispatch result = request.dispatch() File "/opt/odoo13/odoo/odoo/http.py", line 809, in dispatch r = self._call_function(**self.params) File "/opt/odoo13/odoo/odoo/http.py", line 350, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo13/odoo/odoo/service/model.py", line 94, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo13/odoo/odoo/http.py", line 342, in checked_call result.flatten() File "/opt/odoo13/odoo/odoo/http.py", line 1236, in flatten self.response.append(self.render()) File "/opt/odoo13/odoo/odoo/http.py", line 1229, in render return env["ir.ui.view"].render_template(self.template, self.qcontext) File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 1191, in render_template return self.browse(self.get_view_id(template)).render(values, engine) File "/opt/odoo13/odoo/addons/website/models/ir_ui_view.py", line 344, in render return super(View, self).render(values, engine=engine, minimal_qcontext=minimal_qcontext) File "/opt/odoo13/odoo/addons/web_editor/models/ir_ui_view.py", line 27, in render return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext) File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 1199, in render return self.env[engine].render(self.id, qcontext) File "/opt/odoo13/odoo/odoo/addons/base/models/ir_qweb.py", line 58, in render result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context) File "/opt/odoo13/odoo/odoo/addons/base/models/qweb.py", line 260, in render self.compile(template, options)(self, body.append, values or {}) File "/opt/odoo13/odoo/odoo/addons/base/models/qweb.py", line 340, in _compiled_fn raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name) odoo.addons.base.models.qweb.QWebException: 'str' object has no attribute 'id' Traceback (most recent call last): File "/opt/odoo13/odoo/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_website_sale_products_10145 File "<template>", line 2, in body_call_content_10143 File "<template>", line 14, in foreach_10092 File "<template>", line 15, in body_call_content_10090 AttributeError: 'str' object has no attribute 'id' Error to render compiling AST AttributeError: 'str' object has no attribute 'id' Template: website_sale.products Path: /t/t/t[2]/div/div/div/ul/t/t/t[2] Node: <t t-set="catg_id" t-value="active_category.id if active_category else 0"/>