psycopg2.ProgrammingError:关系“ purchase_order_id_seq”不存在

时间:2019-03-03 01:16:51

标签: sql postgresql odoo-12

我尝试在odoo 12中添加采购订单,但出现以下错误:

Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo12/odoo/odoo/http.py", line 654, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)    
  File "/opt/odoo12/odoo/odoo/http.py", line 312, in _handle_exception
   raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
 File "/opt/odoo12/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
 File "/opt/odoo12/odoo/odoo/http.py", line 696, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo12/odoo/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo12/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo12/odoo/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo12/odoo/odoo/http.py", line 939, in __call__
return self.method(*args, **kw)
File "/opt/odoo12/odoo/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/opt/odoo12/odoo/addons/web/controllers/main.py", line 962, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo12/odoo/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo12/odoo/odoo/api.py", line 747, in call_kw
return _call_kw_model_create(method, model, args, kwargs)
File "/opt/odoo12/odoo/odoo/api.py", line 727, in _call_kw_model_create
result = method(recs, *args, **kwargs)
File "<decorator-gen-237>", line 2, in create
File "/opt/odoo12/odoo/odoo/api.py", line 430, in _model_create_single
return create(self, arg)
File "/opt/odoo12/odoo/addons/purchase/models/purchase.py", line 160, in create
return super(PurchaseOrder, self).create(vals)
File "<decorator-gen-116>", line 2, in create
File "/opt/odoo12/odoo/odoo/api.py", line 451, in _model_create_multi
return create(self, [arg])
File "/opt/odoo12/odoo/addons/mail/models/mail_thread.py", line 273, in create
threads = super(MailThread, self).create(vals_list)
File "<decorator-gen-3>", line 2, in create
File "/opt/odoo12/odoo/odoo/api.py", line 452, in _model_create_multi
return create(self, arg)
File "/opt/odoo12/odoo/odoo/models.py", line 3533, in create
records = self._create(data_list)
File "/opt/odoo12/odoo/odoo/models.py", line 3633, in _create
cr.execute(query, params)
File "/opt/odoo12/odoo/odoo/sql_db.py", line 148, in wrapper
return f(self, *args, **kwargs)
File "/opt/odoo12/odoo/odoo/sql_db.py", line 225, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: relation "purchase_order_id_seq" does not exist
LINE 1: ...ing_type_id", "state", "user_id") VALUES (nextval('purchase_...
                                                         ^

我已经升级了模块购买。我搜索了创建purchase_order_id_seq的文件。我现在自己制作了序列,并且可以正常工作。但是我宁愿知道这个序列是从哪里来的。

0 个答案:

没有答案