This question has been flagged

I cant login and use Odoo (version 14) anymore due to an Internal Server Error that occured after I uninstalled a costum module from the Apps tab. The costum module basically extended res.partner by some fields. The Odoo instance is running in a docker environment on an external server that I'm accessing via ssh (in vscode).

Apparently, the fields/columns are still in the database and/or it tries to access them via a query/view, throwing the error. I've searched the forums and I havent found the solution yet. In the database I issued these commands to uninstall the costum module manually:


update ir_module_module
set state='unistalled'
where name='module_name'


This did not change anything and after that I set the state to "to remove". After that it at least returns that my module or rather the table does not exist anymore.
I've restored a backup and can work with that since it was no live system. But am I able to fix that issue and stop postgres from running querys of columns that dont exist anymore? I'm afraid that this happens again. What did I do wrong in the first place that this happened? I believe after I tried to uninstall the costum module there were error messages and one solution I found to that error was: "log out and log in again". But now it does not work at all. Here is a part of the log file that names the missing columns:


Feb 28 09:11:56 erp 72f525776fc7[942]: 2022-02-28 09:11:56,619 38 INFO WIESE_20211027123848_live odoo\.addons\.base\.models\.ir_cron:\ Starting\ job\ `Calendar:\ Event\ Reminder`\.\

Feb\ 28\ 09:11:56\ erp\ e7943b79f44c\[942\]:\ 2022\-02\-28\ 09:11:56\.627\ UTC\ \[1659\]\ ERROR:\ \ column\ res_partner\.customer_christmas_present\ does\ not\ exist\ at\ character\ 1356

Feb\ 28\ 09:11:56\ erp\ e7943b79f44c\[942\]:\ 2022\-02\-28\ 09:11:56\.627\ UTC\ \[1659\]\ STATEMENT:\ \ SELECT\ "res_partner"\."id"\ as\ "id",\ "res_partner"\."name"\ as\ "name",\ "res_partner"\."display_name"\ as\ "display_name",\ "res_partner"\."date"\ as\ "date",\ "res_partner"\."title"\ as\ "title",\ "res_partner"\."parent_id"\ as\ "parent_id",\ "res_partner"\."ref"\ as\ "ref",\ "res_partner"\."lang"\ as\ "lang",\ "res_partner"\."tz"\ as\ "tz",\ "res_partner"\."vat"\ as\ "vat",\ "res_partner"\."website"\ as\ "website",\ "res_partner"\."comment"\ as\ "comment",\ "res_partner"\."credit_limit"\ as\ "credit_limit",\ "res_partner"\."active"\ as\ "active",\ "res_partner"\."employee"\ as\ "employee",\ "res_partner"\."function"\ as\ "function",\ "res_partner"\."street"\ as\ "street",\ "res_partner"\."street2"\ as\ "street2",\ "res_partner"\."zip"\ as\ "zip",\ "res_partner"\."city"\ as\ "city",\ "res_partner"\."state_id"\ as\ "state_id",\ "res_partner"\."country_id"\ as\ "country_id",\ "res_partner"\."partner_latitude"\ as\ "partner_latitude",\ "res_partner"\."partner_longitude"\ as\ "partner_longitude",\ "res_partner"\."mobile"\ as\ "mobile",\ "res_partner"\."is_company"\ as\ "is_company",\ "res_partner"\."industry_id"\ as\ "industry_id",\ "res_partner"\."company_id"\ as\ "company_id",\ "res_partner"\."color"\ as\ "color",\ "res_partner"\."partner_share"\ as\ "partner_share",\ "res_partner"\."commercial_partner_id"\ as\ "commercial_partner_id",\ "res_partner"\."commercial_company_name"\ as\ "commercial_company_name",\ "res_partner"\."company_name"\ as\ "company_name",\ "res_partner"\."customer_christmas_present"\ as\ "customer_christmas_present",\ "res_partner"\."customer_christmas_card"\ as\ "customer_christmas_card", \ \[\.\.\.\.\.\.\]"\ FROM\ "res_partner"\ WHERE\ "res_partner"\.id\ IN\ \(2\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ 2022\-02\-28\ 09:11:56,628\ 38\ ERROR\ WIESE_20211027123848_live\ odoo\.sql_db:\ bad\ query:\ SELECT\ "res_partner"\."id"\ as\ "id",\ "res_partner"\."name"\ as\ "name",\ "res_partner"\."display_name"\ as\ "display_name",\ "res_partner"\."date"\ as\ "date",\ "res_partner"\."title"\ as\ "title",\ "res_partner"\."parent_id"\ as\ "parent_id",\ "res_partner"\."ref"\ as\ "ref",\ "res_partner"\."lang"\ as\ "lang",\ "res_partner"\."tz"\ as\ "tz",\ \[\.\.\.\.\.\.\.\]\ "write_uid"\ as\ "write_uid",\ "res_partner"\."write_date"\ as\ "write_date"\ FROM\ "res_partner"\ WHERE\ "res_partner"\.id\ IN\ \(2\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ ERROR:\ column\ res_partner\.customer_christmas_present\ does\ not\ exist

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ LINE\ 1:\ \.\.\.,\ "res_partner"\."company_name"\ as\ "company_name",\ "res_partn\.\.\.

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \^

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ 2022\-02\-28\ 09:11:56,630\ 38\ ERROR\ WIESE_20211027123848_live\ odoo\.addons\.base\.models\.ir_cron:\ Unexpected\ exception\ while\ processing\ cron\ job\ \{'id':\ 25,\ 'ir_actions_server_id':\ 444,\ 'cron_name':\ 'Calendar:\ Event\ Reminder',\ 'user_id':\ 1,\ 'active':\ True,\ 'interval_number':\ 30,\ 'interval_type':\ 'minutes',\ 'numbercall':\ \-1,\ 'doall':\ False,\ 'nextcall':\ datetime\.datetime\(2022,\ 2,\ 27,\ 16,\ 42,\ 38\),\ 'lastcall':\ datetime\.datetime\(2022,\ 2,\ 27,\ 16,\ 12,\ 50\),\ 'priority':\ 5,\ 'create_uid':\ 1,\ 'create_date':\ datetime\.datetime\(2021,\ 7,\ 14,\ 13,\ 12,\ 32,\ 590953\),\ 'write_uid':\ 1,\ 'write_date':\ datetime\.datetime\(2022,\ 2,\ 16,\ 10,\ 9,\ 51,\ 618852\)\}\

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ Traceback\ \(most\ recent\ call\ last\):

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/api\.py",\ line\ 790,\ in\ get

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ return\ field_cache\[record\._ids\[0\]\]

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ KeyError:\ 1

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ Traceback\ \(most\ recent\ call\ last\):

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/fields\.py",\ line\ 970,\ in\ __get__

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ value\ =\ env\.cache\.get\(record,\ self\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/api\.py",\ line\ 793,\ in\ get

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ raise\ CacheMiss\(record,\ field\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ odoo\.exceptions\.CacheMiss:\ 'res\.users\(1,\)\.tz'

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ Traceback\ \(most\ recent\ call\ last\):

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/api\.py",\ line\ 790,\ in\ get

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ return\ field_cache\[record\._ids\[0\]\]

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ KeyError:\ 2

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ Traceback\ \(most\ recent\ call\ last\):

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/fields\.py",\ line\ 970,\ in\ __get__

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ value\ =\ env\.cache\.get\(record,\ self\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/api\.py",\ line\ 793,\ in\ get

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ raise\ CacheMiss\(record,\ field\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ odoo\.exceptions\.CacheMiss:\ 'res\.partner\(2,\)\.tz'

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ During\ handling\ of\ the\ above\ exception,\ another\ exception\ occurred:

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ Traceback\ \(most\ recent\ call\ last\):

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/addons/base/models/ir_cron\.py",\ line\ 238,\ in\ _process_jobs

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ registry\[cls\._name\]\._process_job\(job_cr,\ job,\ lock_cr\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/addons/base/models/ir_cron\.py",\ line\ 139,\ in\ _process_job

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ now\ =\ fields\.Datetime\.context_timestamp\(cron,\ datetime\.now\(\)\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/fields\.py",\ line\ 1883,\ in\ context_timestamp

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ tz_name\ =\ record\._context\.get\('tz'\)\ or\ record\.env\.user\.tz

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/fields\.py",\ line\ 1019,\ in\ __get__

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ self\.compute_value\(recs\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/fields\.py",\ line\ 1175,\ in\ compute_value

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ records\._compute_field_value\(self\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/models\.py",\ line\ 4059,\ in\ _compute_field_value

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ field\.compute\(self\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/fields\.py",\ line\ 553,\ in\ _compute_related

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ record\[self\.name\]\ =\ self\._process_related\(value\[self\.related_field\.name\]\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/models\.py",\ line\ 5662,\ in\ __getitem__

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ return\ self\._fields\[key\]\.__get__\(self,\ type\(self\)\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/fields\.py",\ line\ 996,\ in\ __get__

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ recs\._fetch_field\(self\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/models\.py",\ line\ 3065,\ in\ _fetch_field

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ self\._read\(fnames\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/models\.py",\ line\ 3132,\ in\ _read

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ cr\.execute\(query_str,\ params\ \+\ \[sub_ids\]\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "",\ line\ 2,\ in\ execute

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/sql_db\.py",\ line\ 101,\ in\ check

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ return\ f\(self,\ \*args,\ \*\*kwargs\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ File\ "/home/odoo/addons/odoo/odoo/sql_db\.py",\ line\ 298,\ in\ execute

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ res\ =\ self\._obj\.execute\(query,\ params\)

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ psycopg2\.ProgrammingError:\ column\ res_partner\.customer_christmas_present\ does\ not\ exist

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ LINE\ 1:\ \.\.\.,\ "res_partner"\."company_name"\ as\ "company_name",\ "res_partn\.\.\.

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \^

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\

Feb\ 28\ 09:11:56\ erp\ 72f525776fc7\[942\]:\ 2022\-02\-28\ 09:11:56,633\ 38\ INFO\ WIESE_20211027123848_live\ odoo.addons.base.models.ir_cron: Starting job `Post process payment transactions`.

Feb 28 09:11:56 erp e7943b79f44c[942]: 2022-02-28 09:11:56.639 UTC [1660] ERROR: column res_partner.customer_christmas_present does not exist at character 1356


Help is very much appreciated. Thanks!

Avatar
Discard