Skip to Content
Menu
This question has been flagged
1 Reply
1807 Views
Odoo Server Error
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/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 "/usr/lib/python3/dist-packages/odoo/fields.py", line 1064, in __get__
    value = record.env.cache.get(record, self)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 1051, in get
    raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('hospital.patient(1,).display_name', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/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 "/usr/lib/python3/dist-packages/odoo/fields.py", line 1064, in __get__
    value = record.env.cache.get(record, self)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 1051, in get
    raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: ('hospital.patient(1,).name_seq', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 656, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 314, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 698, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 346, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 98, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 941, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 519, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 905, in search_read
    return self.do_search_read(model, fields, offset, limit, domain, sort)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 927, in do_search_read
    offset=offset or 0, limit=limit or False, order=sort or False)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4634, in search_read
    result = records.read(fields)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 2837, in read
    vals[name] = convert(record[name], record, use_name_get)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 2263, in convert_to_read
    return (value.id, value.sudo().display_name)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1068, in __get__
    self.determine_value(record)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1181, in determine_value
    self.compute_value(recs)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1135, in compute_value
    self._compute_value(records)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1126, in _compute_value
    getattr(records, self.compute)()
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 1590, in _compute_display_name
    names = dict(self.name_get())
  File "/mnt/extra-addons/hospital_mgmt/models/patient.py", line 19, in name_get
    res.append((field.id, '%s - %s' % (field.name_seq, field.patient_name)))
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1068, in __get__
    self.determine_value(record)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1171, in determine_value
    record._prefetch_field(self)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 2882, in _prefetch_field
    result = records.read([f.name for f in fs], load='_classic_write')
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 2820, in read
    self._read_from_database(stored, inherited)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 2947, in _read_from_database
    cr.execute(query_str, params)
  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 148, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 225, in execute
    res = self._obj.execute(query, params)
psycopg2.ProgrammingError: column hospital_patient.email_id does not exist
LINE 1: ..." as "id","hospital_patient"."gender" as "gender","hospital_...
                                                             ^

please help me understand this error better and provide solution. thank you

Avatar
Discard

You have to check in your model hospital_patient and see if the email_id field declaration.
Can you post the model code so we can help you

Hi, The email_id field is not exits in hospital.patient model, try to check if its exists and you upgrade your module

Author Best Answer

@waleed thanks for the answer, all I needed to do was upgrade

Avatar
Discard
Related Posts Replies Views Activity
3
Oct 23
5973
1
Sep 23
1963
1
May 23
1001
2
Apr 23
1374
1
Mar 23
996