Odoo 12 Community Edition
Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-72-generic x86_64)
I've downgraded an Odoo instance from 11e to 11ce and then migrated it to 12ce using OCA Open Upgrade and have a problem with leftover data.
While I've deleted the app "Helpdesk" and related modules, helpdesk_sale_timesheet and helpdesk_timesheet, they still appear in the data.
For instance. the model helpdesk.ticket still exists in the database, and I cannot delete it because:
Model 'Ticket' contains module data and cannot be removed.
This is also breaking the Discuss (mail) app as I cannot go to the Discuss page. Error:
```
Error:
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo12/odoo/odoo/http.py", line 656, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo12/odoo/odoo/http.py", line 314, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoo12/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/opt/odoo12/odoo/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo12/odoo/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo12/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo12/odoo/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo12/odoo/odoo/http.py", line 941, in __call__
return self.method(*args, **kw)
File "/opt/odoo12/odoo/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/opt/odoo12/odoo-custom-addons/mail_tracking/controllers/main.py", line 91, in mail_init_messaging
values = super().mail_init_messaging()
File "/opt/odoo12/odoo/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/opt/odoo12/odoo/addons/mail/controllers/main.py", line 243, in mail_init_messaging
'mail_failures': request.env['mail.message'].message_fetch_failed(),
File "/opt/odoo12/odoo/addons/mail/models/mail_message.py", line 422, in message_fetch_failed
return messages._format_mail_failures()
File "/opt/odoo12/odoo/addons/mail/models/mail_message.py", line 544, in _format_mail_failures
record = self.env[message.model].browse(message.res_id)
File "/opt/odoo12/odoo/odoo/api.py", line 831, in __getitem__
return self.registry[model_name]._browse((), self)
File "/opt/odoo12/odoo/odoo/modules/registry.py", line 176, in __getitem__
return self.models[model_name]
KeyError: 'helpdesk.ticket'
```
I've taken the following steps to try and remove this data:
Removed the module directories from the server
./odoo-bin --update all
service odoo restart -u all
Apps -> List mode -> Checkbox -> Delete for helpdesk
Remove and reinstall Discuss (mail)
What else can I do?