İçereği Atla
Menü
Bu soru işaretlendi
3892 Görünümler

when i try to load product model with a computing one2many field it shows the below error..i want to load a one2may field which shows the product quantity in location wise.

traceback (most recent call last):
  File "/home/odoo-10.0/odoo/http.py", line 640, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo-10.0/odoo/http.py", line 677, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo-10.0/odoo/http.py", line 333, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo-10.0/odoo/service/model.py", line 101, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo-10.0/odoo/http.py", line 326, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo-10.0/odoo/http.py", line 935, in __call__
    return self.method(*args, **kw)
  File "/home/odoo-10.0/odoo/http.py", line 506, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo-10.0/addons/web/controllers/main.py", line 827, in search_read
    return self.do_search_read(model, fields, offset, limit, domain, sort)
  File "/home/odoo-10.0/addons/web/controllers/main.py", line 849, in do_search_read
    offset=offset or 0, limit=limit or False, order=sort or False)
  File "/home/odoo-10.0/odoo/models.py", line 4695, in search_read
    result = records.read(fields)
  File "/home/odoo-10.0/odoo/models.py", line 3021, in read
    values[name] = field.convert_to_read(record[name], record, use_name_get)
  File "/home/odoo-10.0/odoo/models.py", line 5210, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/home/odoo-10.0/odoo/fields.py", line 873, in __get__
    value = record._cache[self]
  File "/home/odoo-10.0/odoo/models.py", line 5561, in __getitem__
    value = self._recs.env.cache[field][self._recs.id]
KeyError: 1

Avatar
Vazgeç

There may be error in the newly added python code , rather than posting the whole error message, post only the relevant part, ie, the three to four lines. In this question the python code is not added. it will be better if you can add th code that you have done