在odoo12中还原带有附件的数据库时,出现以下错误。
我创建了一个python虚拟环境,并在该虚拟环境中安装了odoo12,然后尝试还原数据库。但是在虚拟环境中也会发生相同的错误。
hrms_db_1 odoo.sql_db: bad query: INSERT INTO "ir_attachment" ("id", "create_uid", "create_date", "write_uid", "write_date", "active", "company_id", "datas_fname", "mimetype", "name", "public", "res_id", "res_model", "type") VALUES (nextval('ir_attachment_id_seq'), 1, (now() at time zone 'UTC'), 1, (now() at time zone 'UTC'), true, 1, 'web.assets_common.js', 'application/javascript', '/web/content/js', true, 0, 'ir.ui.view', 'binary') RETURNING id
ERROR: relation "ir_attachment_id_seq" does not exist LINE 1: ...", "res_id", "res_model", "type") VALUES (nextval('ir_attach...
答案 0 :(得分:1)
答案 1 :(得分:0)
来自https://github.com/Yenthe666/auto_backup/issues/79#issuecomment-420711666
问题是由于Odoo和数据库服务器上的postgres版本不同。 Postgres 9.x和10