Skip to Content
Menu
This question has been flagged
1 Reply
7936 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'

Avatar
Discard
Best Answer

Hi,

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,

Avatar
Discard
Author

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

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 ;)

Author

It is ok now. Thank you Hiren.

@Emipro Technologies Pvt. Ltd Hello on odoo 8 when I try to delete from ir_model I got this error :

ERROR: null value in column "model" violates not-null constraint

DETAIL: Failing row contains (997, null, null, null, null, export_cegid_supp_wizard_write_uid_fkey, null, 548, f, 2020-01-16 17:48:02.783022, 2020-01-16 17:48:02.783022).

CONTEXT: SQL statement "UPDATE ONLY "public"."ir_model_constraint" SET "model" = NULL WHERE $1 OPERATOR(pg_catalog.=) "model""