尝试在odoo9中打开联系人之一时发生崩溃,并引发以下错误:
2018-07-12 19:28:04,856 14098 INFO grp-hhrr openerp.sql_db: Programming error: relation "account_invoice_report" does not exist
LÍNEA 3: FROM account_invoice_report account_invo...
^
, in query
SELECT SUM(price_total) as total, partner_id
FROM account_invoice_report account_invoice_report
WHERE (((("account_invoice_report"."partner_id" in (%s,%s)) AND (("account_invoice_report"."state" not in (%s,%s)) OR "account_invoice_report"."state" IS NULL)) AND ("account_invoice_report"."company_id" = %s)) AND ("account_invoice_report"."type" in (%s,%s)))
GROUP BY partner_id
2018-07-12 19:28:04,856 14098 ERROR grp-hhrr openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/http.py", line 650, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/http.py", line 323, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/http.py", line 316, in checked_call
result = self.endpoint(*a, **kw)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/http.py", line 966, in __call__
return self.method(*args, **kw)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/http.py", line 516, in response_wrap
response = f(*args, **kw)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/addons/web/controllers/main.py", line 895, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/addons/web/controllers/main.py", line 887, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/models.py", line 3208, in read
result = BaseModel.read(records, fields, load=load)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/models.py", line 3254, in read
values[name] = field.convert_to_read(record[name], use_name_get)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/models.py", line 5769, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/fields.py", line 831, in __get__
self.determine_value(record)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/fields.py", line 940, in determine_value
self.compute_value(recs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/fields.py", line 895, in compute_value
self._compute_value(records)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/fields.py", line 885, in _compute_value
getattr(records, self.compute)()
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/addons/account/models/partner.py", line 322, in _invoice_total
self.env.cr.execute(query, where_clause_params)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/sql_db.py", line 154, in wrapper
return f(self, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/sql_db.py", line 233, in execute
res = self._obj.execute(query, params)
ProgrammingError: relation "account_invoice_report" does not exist
LÍNEA 3: FROM account_invoice_report account_invo...
^
我已经尝试过几次更新模块,以及所有依赖关系。我也尝试失败,无法找到引发错误的文件。
答案 0 :(得分:0)
我已经删除了本地git项目并从master那里拉了(可以正常使用),但是错误不断发生,所以这似乎是数据库问题。
通过删除数据库并还原以前的备份,一切正常!因此,请经常备份您的数据库。