Odoo trouble shooting

Job ID: 37782858

Budget: $10 – $30 USD

I have this problem with odoo when I add a brand to a product for example.

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo16/odoo/odoo/api.py", line 983, in get
cache_value = field_cache[record._ids[0]]
KeyError: 563982

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo16/odoo/odoo/fields.py", line 1160, in __get__
value = env.cache.get(record, self)
File "/opt/odoo16/odoo/odoo/api.py", line 990, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'product.template(563982,).active'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo16/odoo/odoo/http.py", line 1583, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/opt/odoo16/odoo/odoo/service/model.py", line 134, in retrying
result = func()
File "/opt/odoo16/odoo/odoo/http.py", line 1610, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/opt/odoo16/odoo/odoo/http.py", line 1807, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/opt/odoo16/enterprise/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/opt/odoo16/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "/opt/odoo16/odoo/odoo/http.py", line 696, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/opt/odoo16/enterprise/odoo/addons/web/controllers/dataset.py", line 42, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo16/enterprise/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo16/odoo/odoo/api.py", line 462, in call_kw
model.env.flush_all()
File "/opt/odoo16/odoo/odoo/api.py", line 732, in flush_all
self._recompute_all()
File "/opt/odoo16/odoo/odoo/api.py", line 728, in _recompute_all
self[field.model_name]._recompute_field(field)
File "/opt/odoo16/odoo/odoo/models.py", line 6163, in _recompute_field
field.recompute(records)
File "/opt/odoo16/odoo/odoo/fields.py", line 1346, in recompute
self.compute_value(recs)
File "/opt/odoo16/odoo/odoo/fields.py", line 1368, in compute_value
records._compute_field_value(self)
File "/opt/odoo16/odoo/odoo/models.py", line 4193, in _compute_field_value
fields.determine(field.compute, self)
File "/opt/odoo16/odoo/odoo/fields.py", line 97, in determine
return needle(*args)
File "/opt/odoo16/odoo-custom-addons/odoov16/product_brand_inventory/models/brand.py", line 42, in get_count_products
self.product_count = len(self.member_ids)
File "/opt/odoo16/odoo/odoo/fields.py", line 4313, in __get__
return super().__get__(records, owner)
File "/opt/odoo16/odoo/odoo/fields.py", line 2772, in __get__
return super().__get__(records, owner)
File "/opt/odoo16/odoo/odoo/fields.py", line 1253, in __get__
return self.convert_to_record(value, record)
File "/opt/odoo16/odoo/odoo/fields.py", line 4127, in convert_to_record
corecords = corecords.filtered(Comodel._active_name).with_prefetch(prefetch_ids)
File "/opt/odoo16/odoo/odoo/models.py", line 5386, in filtered
self.mapped(name)
File "/opt/odoo16/odoo/odoo/models.py", line 5362, in mapped
recs = recs._fields[name].mapped(recs)
File "/opt/odoo16/odoo/odoo/fields.py", line 1279, in mapped
self.__get__(first(remaining), type(remaining))
File "/opt/odoo16/odoo/odoo/fields.py", line 1186, in __get__
recs._fetch_field(self)
File "/opt/odoo16/odoo/odoo/models.py", line 3162, in _fetch_field
self._read(fnames)
File "/opt/odoo16/odoo/odoo/models.py", line 3268, in _read
self.env.cache.insert_missing(fetched, field, values)
File "/opt/odoo16/odoo/odoo/api.py", line 1086, in insert_missing
field_cache.setdefault(id_, None)
MemoryError

The above server error caused the following client error:
null
Related categories: Python Odoo