De volgende query op de Odoo projectenlijst:
select *
from project
geeft een foutmelding:
itgenodo035:
Odoo Server Error:
not all arguments converted during string formatting (200) (200).
De oorzaak is een bug in Odoo 16.0. Deze wordt afgehandeld via:
De achterliggende foutmelding uit de Odoo externe API is:
{
"jsonrpc": "2.0",
"id": 5,
"error": {
"code": 200,
"message": "Odoo Server Error",
"data": {
"name": "builtins.TypeError",
"debug": "Traceback (most recent call last):\n File \"/home/odoo/src/odoo/saas-16.1/odoo/api.py\", line 958, in get\n cache_value = field_cache[record._ids[0]]\nKeyError: 6\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/home/odoo/src/odoo/saas-16.1/odoo/fields.py\", line 1142, in __get__\n value = env.cache.get(record, self)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/api.py\", line 965, in get\n raise CacheMiss(record, field)\nodoo.exceptions.CacheMiss: 'project.project(6,).purchase_orders_count'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/home/odoo/src/odoo/saas-16.1/odoo/http.py\", line 1677, in _serve_db\n return service_model.retrying(self._serve_ir_http, self.env)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/service/model.py\", line 134, in retrying\n result = func()\n File \"/home/odoo/src/odoo/saas-16.1/odoo/http.py\", line 1706, in _serve_ir_http\n response = self.dispatcher.dispatch(rule.endpoint, args)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/http.py\", line 1903, in dispatch\n result = self.request.registry['ir.http']._dispatch(endpoint)\n File \"/home/odoo/src/odoo/saas-16.1/addons/website/models/ir_http.py\", line 234, in _dispatch\n response = super()._dispatch(endpoint)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/addons/base/models/ir_http.py\", line 149, in _dispatch\n result = endpoint(**request.params)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/http.py\", line 708, in route_wrapper\n result = endpoint(self, *args, **params_ok)\n File \"/home/odoo/src/custom/trial/saas_trial/controllers/main.py\", line 273, in jsonrpc\n res = super(OdooRPC, self).jsonrpc(service, method, args)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/http.py\", line 708, in route_wrapper\n result = endpoint(self, *args, **params_ok)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/addons/base/controllers/rpc.py\", line 156, in jsonrpc\n return dispatch_rpc(service, method, args)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/http.py\", line 377, in dispatch_rpc\n return dispatch(method, params)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/service/model.py\", line 37, in dispatch\n res = execute_kw(db, uid, *params[3:])\n File \"/home/odoo/src/odoo/saas-16.1/odoo/service/model.py\", line 59, in execute_kw\n return execute(db, uid, obj, method, *args, **kw or {})\n File \"/home/odoo/src/odoo/saas-16.1/odoo/service/model.py\", line 65, in execute\n res = execute_cr(cr, uid, obj, method, *args, **kw)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/service/model.py\", line 50, in execute_cr\n result = retrying(partial(odoo.api.call_kw, recs, method, args, kw), env)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/service/model.py\", line 134, in retrying\n result = func()\n File \"/home/odoo/src/odoo/saas-16.1/odoo/api.py\", line 457, in call_kw\n result = _call_kw_model(method, model, args, kwargs)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/api.py\", line 430, in _call_kw_model\n result = method(recs, *args, **kwargs)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/models.py\", line 4979, in search_read\n result = records.read(fields, **read_kwargs)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/models.py\", line 2970, in read\n return self._read_format(fnames=fields, load=load)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/models.py\", line 3119, in _read_format\n vals[name] = convert(record[name], record, use_name_get)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/models.py\", line 5887, in __getitem__\n return self._fields[key].__get__(self, type(self))\n File \"/home/odoo/src/odoo/saas-16.1/odoo/fields.py\", line 1191, in __get__\n self.compute_value(recs)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/fields.py\", line 1350, in compute_value\n records._compute_field_value(self)\n File \"/home/odoo/src/odoo/saas-16.1/addons/mail/models/mail_thread.py\", line 399, in _compute_field_value\n return super()._compute_field_value(field)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/models.py\", line 4201, in _compute_field_value\n getattr(self, field.compute)()\n File \"/home/odoo/src/odoo/saas-16.1/addons/project_purchase/models/project.py\", line 31, in _compute_purchase_orders_count\n self._cr.execute(query_string, query_param)\n File \"/home/odoo/src/odoo/saas-16.1/odoo/sql_db.py\", line 315, in execute\n res = self._obj.execute(query, params)\nTypeError: not all arguments converted during string formatting\n",
"message": "not all arguments converted during string formatting",
"arguments": [
"not all arguments converted during string formatting"
],
"context": {}
}
}
}
Het probleem treedt ook op bij het ophalen van de taken op een project. In nieuwe Odoo SQL-driver releases zal dit specifieke probleem als itgenodo046
gerapporteerd worden.