General

¡Bienvenido a los foros Aeodoo!

Somos la comunidad de Odoo internacional hispanohablante.
Estos foros son para compartir y debatir dudas técnicas, funcionales y mejores prácticas para Odoo. Recuerda que no están permitidos los insultos, descalificaciones o spam, cualquier conducta reprobable supondrá el baneo del usuario.

0

[v16] Error en base de datos

Avatar
FERNANDO MESEGUER

Hola de buenas a primeras me ha aparecido este error: 

Traceback (most recent call last):

  File "/opt/odoo16/odoo16/odoo/api.py", line 984, in get

    cache_value = field_cache[record._ids[0]]

KeyError: 514


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/opt/odoo16/odoo16/odoo/fields .py", line 1160, in __get__

    value = env.cache.get(record, self)

  File "/opt/odoo16/odoo16/odoo/api.py", line 991, in get

    raise CacheMiss(record, field)

odoo.exceptions.CacheMiss: 'sale.order(514,).delivery_count'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/opt/odoo16/odoo16/odoo/api.py", line 984, in get

    cache_value = field_cache[record._ids[0]]

KeyError: 514


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/opt/odoo16/odoo16/odoo/fields.py", line 1160, in __get__

    value = env.cache.get(record, self)

  File "/opt/odoo16/odoo16/odoo/api.py", line 991, in get

    raise CacheMiss(record, field)

odoo.exceptions.CacheMiss: 'sale.order(514,).picking_ids'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/opt/odoo16/odoo16/odoo/http.py", line 1588, in _serve_db

    return service_model.retrying(self._serve_ir_http, self.env)

  File "/opt/odoo16/odoo16/odoo/service/model.py", line 133, in retrying

    result = func()

  File "/opt/odoo16/odoo16/odoo/http.py", line 1615, in _serve_ir_http

    response = self.dispatcher.dispatch(rule.endpoint, args)

  File "/opt/odoo16/odoo16/odoo/http.py", line 1819, in dispatch

    result = self.request.registry['ir.http']._dispatch(endpoint)

  File "/opt/odoo16/odoo16/odoo/addons/base/models/ir_http.py", line 154, in _dispatch

    result = endpoint(**request.params)

  File "/opt/odoo16/odoo16/odoo/http.py", line 697, in route_wrapper

    result = endpoint(self, *args, **params_ok)

  File "/opt/odoo16/odoo16/addons/web/controllers/dataset.py", line 42, in call_kw

    return self._call_kw(model, method, args, kwargs)

  File "/opt/odoo16/odoo16/addons/web/controllers/dataset.py", line 33, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/opt/odoo16/odoo16/odoo/api.py", line 461, in call_kw

    result = _call_kw_multi(method, model, args, kwargs)

  File "/opt/odoo16/odoo16/odoo/api.py", line 448, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "/opt/odoo16/odoo16/odoo/models.py", line 2985, in read

    return self._read_format(fnames=fields, load=load)

  File "/opt/odoo16/odoo16/odoo/models.py", line 3164, in _read_format

    vals[name] = convert(record[name], record, use_name_get)

  File "/opt/odoo16/odoo16/odoo/models.py", line 5897, in __getitem__

    return self._fields[key].__get__(self, type(self))

  File "/opt/odoo16/odoo16/odoo/fields.py", line 1209, in __get__

    self.compute_value(recs)

  File "/opt/odoo16/odoo16/odoo/fields.py", line 1387, in compute_value

    records._compute_field_value(self)

  File "/opt/odoo16/odoo16/addons/sale/models/sale_order.py", line 1395, in _compute_field_value

    return super()._compute_field_value(field)

  File "/opt/odoo16/odoo16/addons/mail/models/mail_thread.py", line 403, in _compute_field_value

    return super()._compute_field_value(field)

  File "/opt/odoo16/odoo16/odoo/models.py", line 4221, in _compute_field_value

    fields.determine(field.compute, self)

  File "/opt/odoo16/odoo16/odoo/fields.py", line 97, in determine

    return needle(*args)

  File "/opt/odoo16/odoo16/addons/sale_stock/models/sale_order.py", line 158, in _compute_picking_ids

    order.delivery_count = len(order.picking_ids)

  File "/opt/odoo16/odoo16/odoo/fields.py", line 4351, in __get__

    return super().__get__(records, owner)

  File "/opt/odoo16/odoo16/odoo/fields.py", line 2799, in __get__

    return super().__get__(records, owner)

  File "/opt/odoo16/odoo16/odoo/fields.py", line 1186, in __get__

    recs._fetch_field(self)

  File "/opt/odoo16/odoo16/odoo/models.py", line 3190, in _fetch_field

    self._read(fnames)

  File "/opt/odoo16/odoo16/odoo/models.py", line 3300, in _read

    field.read(fetched)

  File "/opt/odoo16/odoo16/odoo/fields.py", line 4361, in read

    lines = comodel.search(domain)

  File "/opt/odoo16/odoo16/odoo/models.py", line 1513, in search

    return res if count else self.browse(res)

  File "/opt/odoo16/odoo16/odoo/models.py", line 5124, in browse

    if not ids:

  File "/opt/odoo16/odoo16/odoo/tools/query.py", line 217, in __bool__

    return bool(self._result)

  File "/opt/odoo16/odoo16/odoo/tools/func.py", line 28, in __get__

    value = self.fget(obj)

  File "/opt/odoo16/odoo16/odoo/tools/query.py", line 210, in _result

    self._cr.execute(query_str, params)

  File "/opt/odoo16/odoo16/odoo/sql_db.py", line 321, in execute

    res = self._obj.execute(query, params)

psycopg2.errors.InternalError_: pg_attribute catalog is missing 1 attribute(s) for relation OID 28735

LINE 1: SELECT "stock_picking".id FROM "stock_picking" WHERE ("stock...

                                       ^

The above server error caused the following client error:

null


He probado de hacer un dump de la base de datos o enviar un comando desde psql, por ejemplo:

SELECT COUNT(*) FROM "stock_picking";

ERROR:  pg_attribute catalog is missing 4 attribute(s) for relation OID 28735

LINE 1: SELECT COUNT(*) FROM "stock_picking";

Entiendo que la tabla stock_picking está dañada o algo parecido, habría forma de repararla?

Avatar
Descartar

Su respuesta

Intente dar una respuesta sustancial. Si desea hacer un comentario sobre la pregunta o la respuesta, utilice la herramienta de comentarios. Recuerde que siempre puede revisar sus respuestas , no es necesario responder dos veces a la misma pregunta. No olvide votar , ayuda a seleccionar las mejores preguntas y respuestas