When I switch from SI units to US units and try to add a product the system throws an error. When i switch back to SI then the errors go away. What is happening and how do i correct it? Here is the error. It looks as if i dont have a uom of LB when i actually do. Is there a setting i am missing?
Error:
Odoo Server Error
Traceback (most recent call last):
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\cache.py", line 85, in lookup
r = d[key]
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\func.py", line 69, in wrapper
return func(self, *args, **kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\lru.py", line 44, in __getitem__
a = self.d[obj].me
KeyError: ('ir.model.data', <function IrModelData.xmlid_lookup at 0x04158DF8>, 'uom.product_uom_lb')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 619, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 309, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\pycompat.py", line 14, in reraise
raise value
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 664, in dispatch
result = self._call_function(**self.params)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 345, in _call_function
return checked_call(self.db, *args, **kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\service\model.py", line 93, in wrapper
return f(dbname, *args, **kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 338, in checked_call
result = self.endpoint(*a, **kw)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 909, in __call__
return self.method(*args, **kw)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 510, in response_wrap
response = f(*args, **kw)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1319, in call_kw
return self._call_kw(model, method, args, kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1311, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 407, in call_kw
result = _call_kw_model(method, model, args, kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 380, in _call_kw_model
result = method(recs, *args, **kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 1153, in default_get
defaults[name] = field.default(self)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\product\models\product_template.py", line 36, in _get_default_weight_uom
return self._get_weight_uom_name_from_ir_config_parameter()
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\product\models\product_template.py", line 286, in _get_weight_uom_name_from_ir_config_parameter
return self._get_weight_uom_id_from_ir_config_parameter().display_name
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\product\models\product_template.py", line 280, in _get_weight_uom_id_from_ir_config_parameter
return self.env.ref('uom.product_uom_lb')
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 522, in ref
return self['ir.model.data'].xmlid_to_object(xml_id, raise_if_not_found=raise_if_not_found)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_model.py", line 1638, in xmlid_to_object
t = self.xmlid_to_res_model_res_id(xmlid, raise_if_not_found)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_model.py", line 1622, in xmlid_to_res_model_res_id
return self.xmlid_lookup(xmlid)[1:3]
File "<decorator-gen-24>", line 2, in xmlid_lookup
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_model.py", line 1611, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: uom.product_uom_lb