恢复数据库后的odoo错误

时间:2018-01-03 15:22:13

标签: postgresql odoo odoo-11

我在localhost上使用odoo 11,最近我从中恢复了数据库  PgAdmin 4并从那里成功完成。但是当我从odoo登录屏幕中选择它时,屏幕变为空白而没有响应。找到附图。

我试过这个在浏览器中重置javascript localhost:8069/web?debug=
但仍然没有工作。

以下是日志:

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Odoo 11.0\server\odoo\addons\base\ir\ir_cron.py", line 92, in _callback
self.env['ir.actions.server'].browse(server_action_id).run()
File "C:\Odoo 11.0\server\odoo\addons\base\ir\ir_actions.py", line 536, in run
res = func(action, eval_context=eval_context)
File "C:\Odoo 11.0\server\odoo\addons\base\ir\ir_actions.py", line 417, in run_action_code_multi
safe_eval(action.sudo().code.strip(), eval_context, mode="exec", nocopy=True)  # nocopy allows to return 'action'
File "C:\Odoo 11.0\server\odoo\tools\safe_eval.py", line 370, in safe_eval
pycompat.reraise(ValueError, ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr)), exc_info[2])
File "C:\Odoo 11.0\server\odoo\tools\pycompat.py", line 85, in reraise
raise value.with_traceback(tb)
File "C:\Odoo 11.0\server\odoo\tools\safe_eval.py", line 347, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "", line 1, in <module>
File "C:\Odoo 11.0\server\odoo\addons\mail\models\ir_autovacuum.py", line 13, in power_on
return super(AutoVacuum, self).power_on(*args, **kwargs)
File "C:\Odoo 11.0\server\odoo\addons\base\ir\ir_autovacuum.py", line 36, in power_on
self._gc_transient_models()
File "C:\Odoo 11.0\server\odoo\addons\base\ir\ir_autovacuum.py", line 20, in _gc_transient_models
model._transient_vacuum(force=True)
File "C:\Odoo 11.0\server\odoo\models.py", line 4048, in _transient_vacuum
self._transient_clean_rows_older_than(self._transient_max_hours * 60 * 60)
File "C:\Odoo 11.0\server\odoo\models.py", line 4009, in _transient_clean_rows_older_than
self.sudo().browse(ids).unlink()
File "C:\Odoo 11.0\server\odoo\models.py", line 2857, in unlink
cr.execute(query, (sub_ids,))
File "C:\Odoo 11.0\server\odoo\sql_db.py", line 155, in wrapper
return f(self, *args, **kwargs)
File "C:\Odoo 11.0\server\odoo\sql_db.py", line 232, in execute
res = self._obj.execute(query, params)
ValueError: <class 'psycopg2.IntegrityError'>: "null value in column "wizard_id" violates not-null constraint
DETAIL:  Failing row contains (1, null, 8, null, null, 1, 2018-01-01 03:32:24.944104, 1, 2018-01-01 03:32:25.077112).
CONTEXT:  SQL statement "UPDATE ONLY "public"."change_password_user" SET "wizard_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "wizard_id""
" while evaluating
'model.power_on()'

odoo screen

2 个答案:

答案 0 :(得分:2)

我认为找不到某个方法,你的odoo源代码已经过时了,所以请获取最新的代码格式odoo github:https://github.com/odoo/odoo

然后在终端抛出后更新所有模块,如:

./ odoo-bin -d your_database_name --db-filter your_database_name --addons-path your_all_addons_path_name -u all

这是有用的提示

答案 1 :(得分:0)

可能是您有一些丢失的文件,尝试还原名为: filestore 的文件夹 该文件夹可在以下位置找到:
/home/$User/.local/share/Odoo/filestore
$ User 替换为您的ubuntu用户名