Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/api.py", line 1049, in get
value = self._data[key][field][record._ids[0]]
KeyError: <odoo.models.NewId object at 0x7f5cc17c9d98>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/fields.py", line 1004, in __get__
value = record.env.cache.get(record, self)
File "/opt/odoo/odoo/odoo/api.py", line 1051, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('res.config.settings(<odoo.models.NewId object at 0x7f5cc17c9d98>,).intrastat_remind_user_ids', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/api.py", line 1049, in get
value = self._data[key][field][record._ids[0]]
KeyError: 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/fields.py", line 1004, in __get__
value = record.env.cache.get(record, self)
File "/opt/odoo/odoo/odoo/api.py", line 1051, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('res.company(1,).intrastat_remind_user_ids', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/http.py", line 656, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/odoo/http.py", line 314, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoo/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/opt/odoo/odoo/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/odoo/odoo/http.py", line 941, in __call__
return self.method(*args, **kw)
File "/opt/odoo/odoo/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/odoo/odoo/addons/web/controllers/main.py", line 962, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/odoo/odoo/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo/odoo/api.py", line 759, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/odoo/odoo/api.py", line 746, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo/odoo/odoo/models.py", line 5524, in onchange
snapshot1 = Snapshot(record, nametree)
File "/opt/odoo/odoo/odoo/models.py", line 5414, in __init__
if subnames else record[name]
File "/opt/odoo/odoo/odoo/models.py", line 5123, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/opt/odoo/odoo/odoo/fields.py", line 1010, in __get__
self.determine_draft_value(record)
File "/opt/odoo/odoo/odoo/fields.py", line 1132, in determine_draft_value
self._compute_value(record)
File "/opt/odoo/odoo/odoo/fields.py", line 1068, in _compute_value
self.compute(records)
File "/opt/odoo/odoo/odoo/fields.py", line 2362, in _compute_related
super(_RelationalMulti, self)._compute_related(records)
File "/opt/odoo/odoo/odoo/fields.py", line 632, in _compute_related
record[self.name] = value[self.related_field.name]
File "/opt/odoo/odoo/odoo/models.py", line 5123, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/opt/odoo/odoo/odoo/fields.py", line 1008, in __get__
self.determine_value(record)
File "/opt/odoo/odoo/odoo/fields.py", line 1111, in determine_value
record._prefetch_field(self)
File "/opt/odoo/odoo/odoo/models.py", line 2843, in _prefetch_field
result = records.read([f.name for f in fs], load='_classic_write')
File "/opt/odoo/odoo/odoo/models.py", line 2781, in read
self._read_from_database(stored, inherited)
File "/opt/odoo/odoo/odoo/models.py", line 2942, in _read_from_database
field.read(fetched)
File "/opt/odoo/odoo/odoo/fields.py", line 2711, in read
records._cr.execute(query, where_params)
File "/opt/odoo/odoo/odoo/sql_db.py", line 148, in wrapper
return f(self, *args, **kwargs)
File "/opt/odoo/odoo/odoo/sql_db.py", line 225, in execute
res = self._obj.execute(query, params)
psycopg2.ProgrammingError: column res_company_res_users_rel.company_id does not exist
LINE 1: SELECT res_company_res_users_rel.company_id, res_company_re...
Apparently, it might be caused by the module intrastat_base, where the field intrastat_remind_user_ids is defined without the proper relation attribute while trying to create a table between res.company and res.users (which might already be in place, instantiated by some other Many2many field, like user_ids defined in base module).