When I select the pricelist accessing the pricelist via Sales > Catalog > Pricelists - I receive this error when selecting it.
Error:
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo/11.0/odoo/odoo/fields.py", line 937, in __get__
value = record.env.cache.get(record, self)
File "/opt/odoo/11.0/odoo/odoo/api.py", line 960, in get
value = self._data[field][record.id][key]
KeyError: <odoo.api.Environment object at 0x7f170ecf2748>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/11.0/odoo/odoo/http.py", line 650, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/11.0/odoo/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoo/11.0/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/opt/odoo/11.0/odoo/odoo/http.py", line 692, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/11.0/odoo/odoo/http.py", line 342, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/11.0/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/11.0/odoo/odoo/http.py", line 335, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/11.0/odoo/odoo/http.py", line 936, in __call__
return self.method(*args, **kw)
File "/opt/odoo/11.0/odoo/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/11.0/odoo/addons/web/controllers/main.py", line 934, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/11.0/odoo/addons/web/controllers/main.py", line 926, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/11.0/odoo/odoo/api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/11.0/odoo/odoo/api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo/11.0/odoo/odoo/models.py", line 2601, in read
values[name] = field.convert_to_read(record[name], record, use_name_get)
File "/opt/odoo/11.0/odoo/odoo/models.py", line 4758, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/opt/odoo/11.0/odoo/odoo/fields.py", line 941, in __get__
self.determine_value(record)
File "/opt/odoo/11.0/odoo/odoo/fields.py", line 1052, in determine_value
self.compute_value(recs)
File "/opt/odoo/11.0/odoo/odoo/fields.py", line 1008, in compute_value
self._compute_value(records)
File "/opt/odoo/11.0/odoo/odoo/fields.py", line 999, in _compute_value
getattr(records, self.compute)()
File "/opt/odoo/11.0/custom/addons/product_pricelist_sales_factor/models/product.py", line 33, in _get_pricelist_item_name_price
self.ensure_one()
File "/opt/odoo/11.0/odoo/odoo/models.py", line 4366, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: product.pricelist.item(24, 25, 26)