当尝试在odoo 10.0版中验证或提交新的EXPENSE时,出现以下错误。
This thread is expressed in Odoo Forum
Traceback (most recent call last):
File "/home/gloxon/odoo/http.py", line 642, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/gloxon/odoo/http.py", line 684, in dispatch
result = self._call_function(**self.params)
File "/home/gloxon/odoo/http.py", line 334, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/gloxon/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/home/gloxon/odoo/http.py", line 327, in checked_call
result = self.endpoint(*a, **kw)
File "/home/gloxon/odoo/http.py", line 942, in __call__
return self.method(*args, **kw)
File "/home/gloxon/odoo/http.py", line 507, in response_wrap
response = f(*args, **kw)
File "/home/gloxon/addons/web/controllers/main.py", line 892, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/gloxon/addons/web/controllers/main.py", line 884, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/gloxon/odoo/api.py", line 687, in call_kw
return call_kw_model(method, model, args, kwargs)
File "/home/gloxon/odoo/api.py", line 672, in call_kw_model
result = method(recs, *args, **kwargs)
File "/home/gloxon/addons/mail/models/mail_thread.py", line 228, in create
thread = super(MailThread, self).create(values)
File "/home/gloxon/odoo/models.py", line 3847, in create
record = self.browse(self._create(old_vals))
File "/home/gloxon/odoo/models.py", line 3942, in _create
cr.execute(query, tuple(u[2] for u in updates if len(u) > 2))
File "/home/gloxon/odoo/sql_db.py", line 154, in wrapper
return f(self, *args, **kwargs)
File "/home/gloxon/odoo/sql_db.py", line 231, in execute
res = self._obj.execute(query, params)
ProgrammingError: relation "hr_expense_id_seq" does not exist
LINE 1: ...uid", "create_date", "write_date") VALUES(nextval('hr_expens...
我不知道该怎么办才能解决此问题。
答案 0 :(得分:0)
我遇到了Odoo 12 CE缺少序列的类似情况。原来,我正在将数据库转储从Postgres 10.10还原到Postgres 9.6,而他们彼此不喜欢。
解决方案是安装Postgres 10.10,在那里还原数据库并重新启动Odoo。