500: Internal Server Error
QWeb
Fehlermeldung:
Error to render compiling AST MissingError: ('Datensatz existiert nicht oder kann nicht gefunden werden.\n(Record: ir.attachment(565,), User: 4)', None) Template: website_sale.product Path: /t/t[4]/div/section[1]/div[2]/div[1]/div/t/div[1] Node: <div t-if="attachment.type == 'binary'"> <a class="btn btn-link" t-att-href="'download/product/attachment?attachment_id=%i' % attachment.id" icon="fa fa-download"> <span class="fa fa-download"/> <t t-if="attachment.link_title"> <span t-esc="attachment.link_title"/> </t> <t t-else=""> <span t-esc="attachment.name"/> </t> </a> </div>
Der Fehler tritt bei der Benutzung der Vorlage auf website_sale.product
und entdecken die folgende Einschränkung: <div t-if="attachment.type == 'binary'">
<a class="btn btn-link" t-att-href="'download/product/attachment?attachment_id=%i' % attachment.id" icon="fa fa-download">
<span class="fa fa-download"/>
<t t-if="attachment.link_title">
<span t-esc="attachment.link_title"/>
</t>
<t t-else="">
<span t-esc="attachment.name"/>
</t>
</a>
</div>
Zurückverfolgen
Traceback (most recent call last): File "/home/odoo/addons/odoo/odoo/api.py", line 748, in get value = self._data[field][record._ids[0]] KeyError: 565 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/odoo/addons/odoo/odoo/fields.py", line 1038, in __get__ value = env.cache.get(record, self) File "/home/odoo/addons/odoo/odoo/api.py", line 754, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: ('ir.attachment(565,).type', None) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 334, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_website_sale_product_64 File "<template>", line 5, in body_call_content_62 File "<template>", line 45, in foreach_19 File "/home/odoo/addons/odoo/odoo/fields.py", line 1051, in __get__ _("(Record: %s, User: %s)") % (record, env.uid), odoo.exceptions.MissingError: ('Datensatz existiert nicht oder kann nicht gefunden werden.\n(Record: ir.attachment(565,), User: 4)', None) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/odoo/addons/odoo/odoo/addons/base/models/ir_http.py", line 234, in _dispatch result = request.dispatch() File "/home/odoo/addons/odoo/odoo/http.py", line 809, in dispatch r = self._call_function(**self.params) File "/home/odoo/addons/odoo/odoo/http.py", line 350, in _call_function return checked_call(self.db, *args, **kwargs) File "/home/odoo/addons/odoo/odoo/service/model.py", line 94, in wrapper return f(dbname, *args, **kwargs) File "/home/odoo/addons/odoo/odoo/http.py", line 342, in checked_call result.flatten() File "/home/odoo/addons/odoo/odoo/http.py", line 1259, in flatten self.response.append(self.render()) File "/home/odoo/addons/odoo/odoo/http.py", line 1252, in render return env["ir.ui.view"].render_template(self.template, self.qcontext) File "/home/odoo/addons/odoo/odoo/addons/base/models/ir_ui_view.py", line 1201, in render_template return self.browse(self.get_view_id(template)).render(values, engine) File "/home/odoo/addons/odoo/addons/website/models/ir_ui_view.py", line 347, in render return super(View, self).render(values, engine=engine, minimal_qcontext=minimal_qcontext) File "/home/odoo/addons/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 "/home/odoo/addons/odoo/odoo/addons/base/models/ir_ui_view.py", line 1209, in render return self.env[engine].render(self.id, qcontext) File "/home/odoo/addons/enterprise/web_studio/models/ir_qweb.py", line 43, in render return super(IrQWeb, self).render(template, values=values, **options) File "/home/odoo/addons/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 "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 261, in render self.compile(template, options)(self, body.append, values or {}) File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 341, 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: ('Datensatz existiert nicht oder kann nicht gefunden werden.\n(Record: ir.attachment(565,), User: 4)', None) Traceback (most recent call last): File "/home/odoo/addons/odoo/odoo/api.py", line 748, in get value = self._data[field][record._ids[0]] KeyError: 565 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/odoo/addons/odoo/odoo/fields.py", line 1038, in __get__ value = env.cache.get(record, self) File "/home/odoo/addons/odoo/odoo/api.py", line 754, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: ('ir.attachment(565,).type', None) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/odoo/addons/odoo/odoo/addons/base/models/qweb.py", line 334, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_website_sale_product_64 File "<template>", line 5, in body_call_content_62 File "<template>", line 45, in foreach_19 File "/home/odoo/addons/odoo/odoo/fields.py", line 1051, in __get__ _("(Record: %s, User: %s)") % (record, env.uid), odoo.exceptions.MissingError: ('Datensatz existiert nicht oder kann nicht gefunden werden.\n(Record: ir.attachment(565,), User: 4)', None) Error to render compiling AST MissingError: ('Datensatz existiert nicht oder kann nicht gefunden werden.\n(Record: ir.attachment(565,), User: 4)', None) Template: website_sale.product Path: /t/t[4]/div/section[1]/div[2]/div[1]/div/t/div[1] Node: <div t-if="attachment.type == 'binary'"> <a class="btn btn-link" t-att-href="'download/product/attachment?attachment_id=%i' % attachment.id" icon="fa fa-download"> <span class="fa fa-download"/> <t t-if="attachment.link_title"> <span t-esc="attachment.link_title"/> </t> <t t-else=""> <span t-esc="attachment.name"/> </t> </a> </div>