When try to upgrade from 14 to 15 i got this error and i can not find any solution to fix it,
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/api.py", line 886, in get
return field_cache[record._ids[0]]
KeyError: 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/fields.py", line 1057, in get
value = env.cache.get(record, self)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/api.py", line 889, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'project.project(2,).timesheet_count'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 687, in dispatch
result = self._call_function(self.params)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, *kwargs)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/service/model.py", line 94, in wrapper
return f(dbname, args, kwargs)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, kw)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 916, in call
return self.method(*args, *kw)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 535, in response_wrap
response = f(args, kw)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/addons/web/controllers/main.py", line 1305, in search_read
return self.do_search_read(model, fields, offset, limit, domain, sort)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/addons/web/controllers/main.py", line 1324, in do_search_read
return Model.web_search_read(domain, fields, offset=offset, limit=limit, order=sort)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/addons/web/models/models.py", line 62, in web_search_read
records = self.search_read(domain, fields, offset=offset, limit=limit, order=order)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 5050, in search_read
result = records.read(fields, **read_kwargs)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 3227, in read
return self._read_format(fnames=fields, load=load)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 3247, in _read_format
vals[name] = convert(record[name], record, use_name_get)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 5888, in getitem
return self._fields[key].get(self, type(self))
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/fields.py", line 1106, in get
self.compute_value(recs)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/fields.py", line 1265, in compute_value
records._compute_field_value(self)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/addons/mail/models/mail_thread.py", line 411, in _compute_field_value
return super()._compute_field_value(field)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 4255, in _compute_field_value
getattr(self, field.compute)()
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/addons/hr_timesheet/models/project.py", line 138, in _compute_timesheet_count
timesheet_read_group = self.env['account.analytic.line'].read_group(
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 2438, in read_group
result = self._read_group_raw(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 2484, in _read_group_raw
self._apply_ir_rules(query, 'read')
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 4482, in _apply_ir_rules
expression.expression(domain, self.sudo(), self._table, query)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/osv/expression.py", line 442, in init
self.parse()
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/osv/expression.py", line 701, in parse
right_ids = comodel.with_context(active_test=False)._search([(path[1], operator, right)], order='id')
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 4700, in _search
query = self._where_calc(args)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 4456, in _where_calc
return expression.expression(domain, self).query
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/osv/expression.py", line 442, in init
self.parse()
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/osv/expression.py", line 654, in parse
raise ValueError("Invalid field %s.%s in leaf %s" % (model._name, path[0], str(leaf)))
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: Invalid field project.project.allowed_internal_user_ids in leaf ('allowed_internal_user_ids', 'in', [2])
When try to upgrade from 14 to 15 i got this error and i can not find any solution to fix it,
RPC_ERROR Odoo Server Error Traceback (most recent call last): File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/api.py", line 886, in get return field_cache[record._ids[0]] KeyError: 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/fields.py", line 1057, in get value = env.cache.get(record, self) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/api.py", line 889, in get raise CacheMiss(record, field) odoo.exceptions.CacheMiss: 'project.project(2,).timesheet_count'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 687, in dispatch result = self._call_function(self.params) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 359, in _call_function return checked_call(self.db, *args, *kwargs) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/service/model.py", line 94, in wrapper return f(dbname, args, kwargs) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 348, in checked_call result = self.endpoint(*a, kw) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 916, in call return self.method(*args, *kw) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 535, in response_wrap response = f(args, kw) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/addons/web/controllers/main.py", line 1305, in search_read return self.do_search_read(model, fields, offset, limit, domain, sort) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/addons/web/controllers/main.py", line 1324, in do_search_read return Model.web_search_read(domain, fields, offset=offset, limit=limit, order=sort) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/addons/web/models/models.py", line 62, in web_search_read records = self.search_read(domain, fields, offset=offset, limit=limit, order=order) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 5050, in search_read result = records.read(fields, **read_kwargs) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 3227, in read return self._read_format(fnames=fields, load=load) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 3247, in _read_format vals[name] = convert(record[name], record, use_name_get) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 5888, in getitem return self._fields[key].get(self, type(self)) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/fields.py", line 1106, in get self.compute_value(recs) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/fields.py", line 1265, in compute_value records._compute_field_value(self) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/addons/mail/models/mail_thread.py", line 411, in _compute_field_value return super()._compute_field_value(field) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 4255, in _compute_field_value getattr(self, field.compute)() File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/addons/hr_timesheet/models/project.py", line 138, in _compute_timesheet_count timesheet_read_group = self.env['account.analytic.line'].read_group( File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 2438, in read_group result = self._read_group_raw(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 2484, in _read_group_raw self._apply_ir_rules(query, 'read') File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 4482, in _apply_ir_rules expression.expression(domain, self.sudo(), self._table, query) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/osv/expression.py", line 442, in init self.parse() File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/osv/expression.py", line 701, in parse right_ids = comodel.with_context(active_test=False)._search([(path[1], operator, right)], order='id') File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 4700, in _search query = self._where_calc(args) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/models.py", line 4456, in _where_calc return expression.expression(domain, self).query File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/osv/expression.py", line 442, in init self.parse() File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/osv/expression.py", line 654, in parse raise ValueError("Invalid field %s.%s in leaf %s" % (model._name, path[0], str(leaf))) Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 643, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/mostafa/MSI/ERP/odoo/source_code/odoo15/odoo/http.py", line 301, in _handle_exception raise exception.with_traceback(None) from new_cause ValueError: Invalid field project.project.allowed_internal_user_ids in leaf ('allowed_internal_user_ids', 'in', [2])