I have successfully installed the Odoo addon for OpenEMS in my Odoo 16 instance, and now the OpenEMS area is appearing within Odoo for me.
However, when I try to add a new device in Odoo, I immediately receive āRPC Error - Odoo Server Errorā. Stacktrace below.
It appears that ārec.nameā is evaluating as a boolean instead of a string within the ā_compute_monitoring_url()ā function.
Have you experienced this issue before or are you aware of any misconfigurations that could have caused it?
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/api.py", line 996, in get
cache_value = field_cache[record._ids[0]]
KeyError: <NewId 0x7fccefa95ab0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1161, in __get__
value = env.cache.get(record, self)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 1003, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'openems.device(<NewId 0x7fccefa95ab0>,).monitoring_url'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1633, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1660, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1864, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 697, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 42, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 468, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6587, in onchange
snapshot1 = Snapshot(record, nametree)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6347, in __init__
self.fetch(name)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6357, in fetch
self[name] = record[name]
File "/usr/lib/python3/dist-packages/odoo/models.py", line 5915, in __getitem__
return self._fields[key].__get__(self, self.env.registry[self._name])
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1210, in __get__
self.compute_value(recs)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1392, in compute_value
records._compute_field_value(self)
File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 403, in _compute_field_value
return super()._compute_field_value(field)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4232, in _compute_field_value
fields.determine(field.compute, self)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 98, in determine
return needle(*args)
File "/odoo/odoo-server/addons/openems/models/device.py", line 45, in _compute_monitoring_url
rec.monitoring_url = url + rec.name
TypeError: can only concatenate str (not "bool") to str
The above server error caused the following client error:
null `