Uninstall module referencing non existing models

Rubén Cabrera


I am working with a database migrated from v7 to v8.

There is a module I want to uninstall now on v8, but it references the model stock.picking.out, which no longer exists on v8.

When I click on uninstall I get an error which traceback ends with:

File "/opt/odoo/openerp/addons/base/ir/", line 544, in _module_data_uninstall

model_obj = self.pool[model]

File "/opt/odoo/openerp/modules/", line 102, in __getitem__

return self.models[model_name]

KeyError: u'stock.picking.out'

I tried setting it to uninstalled from SQL, then installing it again and uninstalling, as recommended in a similar question, but the problem persists.

I also modified the module to addapt to the new model structure of stock.picking so I could do the previous steps, and it installs correctly, but when uninstalling I get the same error.

Any ideas?

Thanks a lot!