Odoo Help

0

0
1 Answer
0
Edward Grandstaff
12/03/19 13:01

** Failed to get this in the original message **

Error Message:

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/odoo/odoo-server/odoo/fields.py", line 937, in __get__
    value = record.env.cache.get(record, self)
  File "/odoo/odoo-server/odoo/api.py", line 960, in get
    value = self._data[field][record.id][key]
KeyError: <odoo.api.Environment object at 0x7f7bf99a9c18>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/odoo/odoo-server/odoo/http.py", line 650, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/odoo/odoo-server/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/odoo/odoo-server/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/odoo/odoo-server/odoo/http.py", line 692, in dispatch
    result = self._call_function(**self.params)
  File "/odoo/odoo-server/odoo/http.py", line 342, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/odoo/odoo-server/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/odoo/odoo-server/odoo/http.py", line 335, in checked_call
    result = self.endpoint(*a, **kw)
  File "/odoo/odoo-server/odoo/http.py", line 936, in __call__
    return self.method(*args, **kw)
  File "/odoo/odoo-server/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/odoo/odoo-server/addons/web/controllers/main.py", line 934, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/odoo/odoo-server/addons/web/controllers/main.py", line 926, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/odoo/odoo-server/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/odoo/odoo-server/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/odoo/odoo-server/odoo/models.py", line 2601, in read
    values[name] = field.convert_to_read(record[name], record, use_name_get)
  File "/odoo/odoo-server/odoo/fields.py", line 2000, in convert_to_read
    return (value.id, value.sudo().display_name)
  File "/odoo/odoo-server/odoo/fields.py", line 941, in __get__
    self.determine_value(record)
  File "/odoo/odoo-server/odoo/fields.py", line 1052, in determine_value
    self.compute_value(recs)
  File "/odoo/odoo-server/odoo/fields.py", line 1005, in compute_value
    fields = records._field_computed[self]
KeyError: account.payment.term.display_name

What I was adding in the Fields / New:

Field Name: x_xml_id

Field Label: External ID  / Field Type: Char

Dependencies: id

Compute:

res = self.get_external_id()

for record in self:

       record['x_xml_id'] = res.get(record.id)

Ask a Question
Tag
v11
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now