Hi I wrote a function which was working fine until lately
//get the sale order service
s := api.NewResPartnerService(c)
...
so, err := s.GetAll()
It turns out that err now is not nil and get me this message from the odoo server
error: "Traceback (most recent call last):
File "/home/odoo/src/odoo/11.0/odoo/fields.py", line 949, in __get__
value = record.env.cache.get(record, self)
File "/home/odoo/src/odoo/11.0/odoo/api.py", line 977, in get
value = self._data[key][field][record._ids[0]]
KeyError: 1924
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/odoo/src/odoo/11.0/odoo/service/wsgi_server.py", line 124, in wsgi_xmlrpc
result = odoo.http.dispatch_rpc(service, method, params)
File "/home/odoo/src/odoo/11.0/odoo/http.py", line 118, in dispatch_rpc
result = dispatch(method, params)
File "/home/odoo/src/odoo/11.0/odoo/service/model.py", line 39, in dispatch
res = fn(db, uid, *params)
File "/home/odoo/src/odoo/11.0/odoo/service/model.py", line 172, in execute_kw
return execute(db, uid, obj, method, *args, **kw or {})
File "/home/odoo/src/odoo/11.0/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/src/odoo/11.0/odoo/service/model.py", line 179, in execute
res = execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/odoo/src/odoo/11.0/odoo/service/model.py", line 168, in execute_cr
return odoo.api.call_kw(recs, method, args, kw)
File "/home/odoo/src/odoo/11.0/odoo/api.py", line 697, in call_kw
return call_kw_model(method, model, args, kwargs)
File "/home/odoo/src/odoo/11.0/odoo/api.py", line 682, in call_kw_model
result = method(recs, *args, **kwargs)
File "/home/odoo/src/odoo/11.0/odoo/models.py", line 4296, in search_read
result = records.read(fields)
File "/home/odoo/src/odoo/11.0/odoo/models.py", line 2627, in read
vals[name] = convert(record[name], record, use_name_get)
File "/home/odoo/src/odoo/11.0/odoo/models.py", line 4823, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/home/odoo/src/odoo/11.0/odoo/fields.py", line 953, in __get__
self.determine_value(record)
File "/home/odoo/src/odoo/11.0/odoo/fields.py", line 1066, in determine_value
self.compute_value(recs)
File "/home/odoo/src/odoo/11.0/odoo/fields.py", line 1020, in compute_value
self._compute_value(records)
File "/home/odoo/src/odoo/11.0/odoo/fields.py", line 1011, in _compute_value
getattr(records, self.compute)()
File "/home/odoo/src/odoo/11.0/odoo/addons/base/res/res_partner.py", line 374, in _compute_email_formatted
partner.email_formatted = tools.formataddr((partner.name or u"False", partner.email or u"False"))
File "/home/odoo/src/odoo/11.0/odoo/tools/mail.py", line 556, in formataddr
address.encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 11: ordinal not in range(128)
Hi I wrote a function which was working fine until lately
It turns out that err now is not nil and get me this message from the odoo server
I did not change anything, do you have any idea ?
Thank you