Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Uninstall Module where the source code is not there anymore

By
Michael Aigner
on 3/9/16, 1:17 PM 418 views

Hi,


how can i uninstall a module (stock_inventory_import), although the source code in the filesystem is not there anymore. When I try to uninstall it, I always get the error message:


"

Traceback (most recent call last):

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 537, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 574, in dispatch

result = self._call_function(**self.params)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 310, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 118, in wrapper

return f(dbname, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 307, in checked_call

return self.endpoint(*a, **kw)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 803, in __call__

return self.method(*args, **kw)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 403, in response_wrap

response = f(*args, **kw)

File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 948, in call_button

action = self._call_kw(model, method, args, {})

File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 936, in _call_kw

return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/wizard/base_module_upgrade.py", line 105, in upgrade_module

openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)

File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 370, in new

openerp.modules.load_modules(registry._db, force_demo, status, update_module)

File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 423, in load_modules

registry['ir.module.module'].module_uninstall(cr, SUPERUSER_ID, modules_to_remove.values())

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 459, in module_uninstall

ir_model_data._module_data_uninstall(cr, uid, modules_to_remove, context)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_model.py", line 1192, in _module_data_uninstall

ir_model_constraint._module_data_uninstall(cr, uid, constraint_ids, context)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 250, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_model.py", line 550, in _module_data_uninstall

model_obj = self.pool[model]

File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 102, in __getitem__

return self.models[model_name]

KeyError: u'stock.inventory.import.line'

"


Is there a chance to find out where Odoo looks for the sourcecode in the filesystem? Is that information stored somewhere? Unfortunately we don't know where we initially installed it and with another rollout we must have deleted it.


Thanks,

Michael

1
Michael Aigner
On 3/10/16, 2:07 PM

Answer: Update the module to uninstalled and then reinstall it again.


update ir_module_module

set state = 'uninstalled'

where name = 'stock_inventory_import';

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/9/16, 1:17 PM
Seen: 418 times
Last updated: 3/10/16, 2:07 PM