Odoo Help


Error in Uninstalling any module

Karolin Ar.
on 10/18/14, 4:30 AM 3,368 views

OpenERP Server Error

Traceback (most recent call last):
  File "/opt/odoo/v8/server/openerp/http.py", line 470, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/v8/server/openerp/http.py", line 294, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/v8/server/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/v8/server/openerp/http.py", line 291, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/odoo/v8/server/openerp/http.py", line 638, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/v8/server/openerp/http.py", line 337, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/v8/web/addons/web/controllers/main.py", line 1248, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo/v8/web/addons/web/controllers/main.py", line 1236, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/opt/odoo/v8/server/openerp/addons/base/module/module.py", line 499, in button_immediate_uninstall
    return self._button_immediate_function(cr, uid, ids, self.button_uninstall, context=context)
  File "/opt/odoo/v8/server/openerp/addons/base/module/module.py", line 479, in _button_immediate_function
    registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
  File "/opt/odoo/v8/server/openerp/modules/registry.py", line 299, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo/v8/server/openerp/modules/loading.py", line 407, in load_modules
    registry['ir.module.module'].module_uninstall(cr, SUPERUSER_ID, mod_ids_to_remove)
  File "/opt/odoo/v8/server/openerp/addons/base/module/module.py", line 443, in module_uninstall
    ir_model_constraint._module_data_uninstall(cr, uid, constraint_ids, context)
  File "/opt/odoo/v8/server/openerp/addons/base/ir/ir_model.py", line 521, in _module_data_uninstall
    model_obj = self.pool[model]
  File "/opt/odoo/v8/server/openerp/modules/registry.py", line 106, in __getitem__
    return self.models[model_name]
KeyError: u'crm.lead.assignation'



When you uninstall any module, the models ( objects ) which are in that module, needs to be removed. ( Settings >> Technical >> Database Structure >> Models )

But I have seen sometimes that models not able to delete from here. 

So in order to remove that error, please do following thing.

1) Go to Terminal

2) Open postgres database console.

3) Fire following query,

delete from ir_model where model = 'crm.lead.assignation'

4) Restart OpenERP.

Now that error should be no more.

Feel free to comeback if you still having problem,

Thank you Hiren. Trying to access the ERP page. still i have no access to it.

Karolin Ar.
on 10/18/14, 9:45 AM

Can you tell me which error you are facing ?? May be you still need to clear other issues... Just paste your console log. So I can help you better. Waiting for solving this issue ;)

Hiren Vora - CEO at Emipro Technologies Pvt. Ltd. India
on 10/18/14, 9:52 AM

It is ok now. Thank you Hiren.

Karolin Ar.
on 10/20/14, 4:24 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 10/18/14, 4:30 AM
Seen: 3368 times
Last updated: 3/16/15, 8:10 AM