Skip to Content
Menu
This question has been flagged
2 Replies
1320 Views

I'm pretty new in Odoo 15 Community, for the moment I didn't modified any code but this error is persistent when I try to create a new product.


Traceback (most recent call last):
  File "/opt/odoo/odoo/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "/opt/odoo/odoo/odoo/tools/func.py", line 71, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/odoo/odoo/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
KeyError: ('product.template', 0x7f77854ab490>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odoo/odoo/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "/opt/odoo/odoo/odoo/tools/func.py", line 71, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/odoo/odoo/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
KeyError: ('ir.model.data', 0x7f778a47b1c0>, 'product.product_category_all')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odoo/odoo/odoo/http.py", line 687, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/odoo/http.py", line 348, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo/odoo/http.py", line 916, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo/odoo/http.py", line 535, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 1347, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 1339, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/odoo/api.py", line 464, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo/odoo/api.py", line 451, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/odoo/odoo/models.py", line 6356, in onchange
    defaults = self.default_get(missing_names)
  File "/opt/odoo/odoo/odoo/models.py", line 1410, in default_get
    defaults[name] = field.default(self)
  File "", line 2, in _get_default_category_id
  File "/opt/odoo/odoo/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/opt/odoo/odoo/addons/product/models/product_template.py", line 24, in _get_default_category_id
    return self.env.ref('product.product_category_all')
  File "/opt/odoo/odoo/odoo/api.py", line 578, in ref
    res_model, res_id = self['ir.model.data']._xmlid_to_res_model_res_id(
  File "/opt/odoo/odoo/odoo/addons/base/models/ir_model.py", line 1935, in _xmlid_to_res_model_res_id
    return self._xmlid_lookup(xmlid)[1:3]
  File "", line 2, in _xmlid_lookup
  File "/opt/odoo/odoo/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/opt/odoo/odoo/odoo/addons/base/models/ir_model.py", line 1928, in _xmlid_lookup
    raise ValueError('External ID not found in the system: %s' % xmlid)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo/odoo/odoo/http.py", line 643, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/odoo/http.py", line 301, in _handle_exception
    raise exception.with_traceback(None) from new_cause
ValueError: External ID not found in the system: product.product_category_all
A little of backstory, I imported a lot of products, atributes and categories and did some testing deleting and importing again that is probably the origin of the issue.
Is this a known bug? Does anyone know how to fix it? Thank you for your time A little of backstory, I imported a lot of products, atributes and categories and did some testing deleting and importing again that is probably the origin of the issue.  
Avatar
Discard
Best Answer

Hi,

This error arises because of the deletion of the default product category.



Goto Apps Upgrade 'Products & Pricelists' and check. 

Hope it helps,
Kiran K

Avatar
Discard
Author Best Answer

Hi Kiran K, Yes probably it's because of that but checking the categories all of the defaults ones are there but duplicated. Could this be the problem too? And if it's that how can I fix it?
Thank you

Solved it just updating the applications as Kiran said, Thanks a lot <3

Avatar
Discard
Related Posts Replies Views Activity
1
Oct 23
2201
1
May 22
1877
2
Dec 24
3136
1
Dec 24
359
4
Nov 24
1368