콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
5994 화면

I create a module and when I uninstall it, I have the following error message.

How can I uninstall it without this error message?

Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/openerp/http.py", line 470, in dispatch result = self._call_function(**self.params) File "/usr/lib/pymodules/python2.7/openerp/http.py", line 294, in _call_function return checked_call(self.db, *args, **kwargs) File "/usr/lib/pymodules/python2.7/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/usr/lib/pymodules/python2.7/openerp/http.py", line 291, in checked_call return self.endpoint(*a, **kw) File "/usr/lib/pymodules/python2.7/openerp/http.py", line 638, in __call__ return self.method(*args, **kw) File "/usr/lib/pymodules/python2.7/openerp/http.py", line 337, in response_wrap response = f(*args, **kw) File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1246, in call_button action = self._call_kw(model, method, args, {}) File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1234, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/usr/lib/pymodules/python2.7/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 "/usr/lib/pymodules/python2.7/openerp/addons/base/module/module.py", line 479, in _button_immediate_function registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True) File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 299, in new openerp.modules.load_modules(registry._db, force_demo, status, update_module) File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 403, in load_modules registry['ir.module.module'].module_uninstall(cr, SUPERUSER_ID, mod_ids_to_remove) File "/usr/lib/pymodules/python2.7/openerp/addons/base/module/module.py", line 443, in module_uninstall ir_model_constraint._module_data_uninstall(cr, uid, constraint_ids, context) File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_model.py", line 521, in _module_data_uninstall model_obj = self.pool[model] File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 106, in __getitem__ return self.models[model_name] KeyError: u'formateur'

Thanks

아바타
취소
베스트 답변
Hi ,

Its because you created a table named 'formateur' and then removed that table. And after that trying to uninstall that module. In order to uninstall that module you need to rewrite that class (table) simply and no need to define fileds to that table. For eg:


class Formateur(models.Model):
_name = 'formateur'

아바타
취소
베스트 답변

hi Dede,

check if the field "formateur" is present in your database

아바타
취소
관련 게시물 답글 화면 활동
4
10월 20
9007
1
11월 19
5015
1
3월 16
4891
1
3월 15
8300
3
2월 24
10453