Skip to Content
Menu
This question has been flagged
1 Reply
15408 Views

I am Using odoo13 community edition and once upon a time it browses such a problem if anyone has this issue you welcome and let me fix it. the following is qweb and traceback error message 

Error message:

Qweb
Error to render compiling AST UndefinedTable: relation "ir_attachment_id_seq" does not exist LINE 1: ...ore_fname", "type", "website_id") VALUES (nextval('ir_attach... ^ Template: web.frontend_layout Path: /t/html/head/t[7] Node: <t t-call-assets="web.assets_common" t-js="false"/>

The error occurred while rendering the template web.frontend_layout and evaluating the following expression: <t t-call-assets="web.assets_common" t-js="false"/>         

Traceback
Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\cache.py", line 85, in lookup r = d[key] File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\func.py", line 69, in wrapper return func(self, *args, **kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\lru.py", line 44, in __getitem__ a = self.d[obj].me KeyError: ('ir.qweb', <function IrQWeb._get_asset_nodes at 0x03EDBD20>, 'web.assets_common', 'en_US', True, False, '', False, False, False, (1,)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\qweb.py", line 332, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_web_frontend_layout_638 File "<decorator-gen-55>", line 2, in _get_asset_nodes File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\cache.py", line 90, in lookup value = d[key] = self.method(*args, **kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_qweb.py", line 299, in _get_asset_nodes return remains + asset.to_node(css=css, js=js, debug=debug, async_load=async_load, defer_load=defer_load, lazy_load=lazy_load) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\assetsbundle.py", line 151, in to_node css_attachments = self.css() or [] File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\assetsbundle.py", line 332, in css self.save_attachment("css", css) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\assetsbundle.py", line 289, in save_attachment attachment = ira.with_user(SUPERUSER_ID).create(values) File "<decorator-gen-137>", line 2, in create File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 314, in _model_create_single return create(self, arg) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\website\models\ir_attachment.py", line 25, in create return super(Attachment, self).create(vals) File "<decorator-gen-40>", line 2, in create File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 335, in _model_create_multi return create(self, [arg]) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_attachment.py", line 524, in create return super(IrAttachment, self).create(vals_list) File "<decorator-gen-3>", line 2, in create File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 336, in _model_create_multi return create(self, arg) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 3742, in create records = self._create(data_list) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 3828, in _create cr.execute(query, params) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\sql_db.py", line 164, in wrapper return f(self, *args, **kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\sql_db.py", line 241, in execute res = self._obj.execute(query, params) psycopg2.errors.UndefinedTable: relation "ir_attachment_id_seq" does not exist LINE 1: ...ore_fname", "type", "website_id") VALUES (nextval('ir_attach... ^ During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_http.py", line 229, in _dispatch result = request.dispatch() File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 809, in dispatch r = self._call_function(**self.params) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 350, in _call_function return checked_call(self.db, *args, **kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\service\model.py", line 94, in wrapper return f(dbname, *args, **kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 342, in checked_call result.flatten() File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 1236, in flatten self.response.append(self.render()) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 1229, in render return env["ir.ui.view"].render_template(self.template, self.qcontext) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 1177, in render_template return self.browse(self.get_view_id(template)).render(values, engine) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\website\models\ir_ui_view.py", line 345, in render return super(View, self).render(values, engine=engine, minimal_qcontext=minimal_qcontext) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\web_editor\models\ir_ui_view.py", line 25, in render return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 1185, in render return self.env[engine].render(self.id, qcontext) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_qweb.py", line 58, in render result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\qweb.py", line 260, in render self.compile(template, options)(self, body.append, values or {}) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\qweb.py", line 334, in _compiled_fn raise e File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\qweb.py", line 332, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_web_login_583 File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\qweb.py", line 334, in _compiled_fn raise e File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\qweb.py", line 332, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_web_login_layout_589 File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\qweb.py", line 339, 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: relation "ir_attachment_id_seq" does not exist LINE 1: ...ore_fname", "type", "website_id") VALUES (nextval('ir_attach... ^ Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\cache.py", line 85, in lookup r = d[key] File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\func.py", line 69, in wrapper return func(self, *args, **kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\lru.py", line 44, in __getitem__ a = self.d[obj].me KeyError: ('ir.qweb', <function IrQWeb._get_asset_nodes at 0x03EDBD20>, 'web.assets_common', 'en_US', True, False, '', False, False, False, (1,)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\qweb.py", line 332, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_web_frontend_layout_638 File "<decorator-gen-55>", line 2, in _get_asset_nodes File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\cache.py", line 90, in lookup value = d[key] = self.method(*args, **kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_qweb.py", line 299, in _get_asset_nodes return remains + asset.to_node(css=css, js=js, debug=debug, async_load=async_load, defer_load=defer_load, lazy_load=lazy_load) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\assetsbundle.py", line 151, in to_node css_attachments = self.css() or [] File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\assetsbundle.py", line 332, in css self.save_attachment("css", css) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\assetsbundle.py", line 289, in save_attachment attachment = ira.with_user(SUPERUSER_ID).create(values) File "<decorator-gen-137>", line 2, in create File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 314, in _model_create_single return create(self, arg) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\website\models\ir_attachment.py", line 25, in create return super(Attachment, self).create(vals) File "<decorator-gen-40>", line 2, in create File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 335, in _model_create_multi return create(self, [arg]) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_attachment.py", line 524, in create return super(IrAttachment, self).create(vals_list) File "<decorator-gen-3>", line 2, in create File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 336, in _model_create_multi return create(self, arg) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 3742, in create records = self._create(data_list) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 3828, in _create cr.execute(query, params) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\sql_db.py", line 164, in wrapper return f(self, *args, **kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\sql_db.py", line 241, in execute res = self._obj.execute(query, params) psycopg2.errors.UndefinedTable: relation "ir_attachment_id_seq" does not exist LINE 1: ...ore_fname", "type", "website_id") VALUES (nextval('ir_attach... ^ Error to render compiling AST UndefinedTable: relation "ir_attachment_id_seq" does not exist LINE 1: ...ore_fname", "type", "website_id") VALUES (nextval('ir_attach... ^ Template: web.frontend_layout Path: /t/html/head/t[7] 

Node: <t t-call-assets="web.assets_common" t-js="false"/>   

Avatar
Discard

Hi, did you find any solution for this?

Author Best Answer

@SHIV Shankar.

my environment was ubuntu 20.04, python 3.8.5, and Odoo 13 community edition 

I have solved it by downgrading the python version to 3.6.9 specific version and ubuntu to 18.04 take the backup of your database and use those environments.

Avatar
Discard