Hi, can anyone try to help me.
i have model DOCUMENTS with "Files" as many2many field.
and model FILES with "Document" as many2one field.
i tried generation of x count FILES for each document and connect them to the Document Model.
this error occurs after changing some other values and tried to save the changes
and i get
Traceback (most recent call last):
File "/opt/odoo/odoo/api.py", line 989, in get
cache_value = field_cache[record._ids[0]]
~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 107
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/fields.py", line 1160, in __get__
value = env.cache.get(record, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/api.py", line 996, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'dss.ads(107,).contract_need_media'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/http.py", line 1591, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/service/model.py", line 133, in retrying
result = func()
^^^^^^
File "/opt/odoo/odoo/http.py", line 1618, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/http.py", line 1822, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/http.py", line 697, in route_wrapper
result = endpoint(self, *args, **params_ok)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/addons/web/controllers/dataset.py", line 42, in call_kw
return self._call_kw(model, method, args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/api.py", line 466, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/addons/mail/models/mail_thread.py", line 312, in write
self._track_prepare(self._fields)
File "/opt/odoo/addons/mail/models/mail_thread.py", line 518, in _track_prepare
values.setdefault(fname, record[fname])
~~~~~~^^^^^^^
File "/opt/odoo/odoo/models.py", line 5904, in __getitem__
return self._fields[key].__get__(self, type(self))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/fields.py", line 2801, in __get__
return super().__get__(records, owner)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/fields.py", line 1186, in __get__
recs._fetch_field(self)
File "/opt/odoo/odoo/models.py", line 3194, in _fetch_field
self._read(fnames)
File "/opt/odoo/odoo/models.py", line 3304, in _read
field.read(fetched)
File "/opt/odoo/odoo/fields.py", line 4757, in read
order_by = comodel._generate_order_by(None, wquery)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/models.py", line 4568, in _generate_order_by
order_by_elements = self._generate_order_by_inner(self._table, order_spec, query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/models.py", line 4534, in _generate_order_by_inner
raise ValueError("Invalid field %r on model %r" % (order_field, self._name))
ValueError: Invalid field 'id' on model '_unknown'
The above server error caused the following client error:
nulli not know how to solve and not find any point to look deeper
maybe anyone can help