自定义模块未安装

时间:2014-12-08 22:30:19

标签: openerp odoo openerp-8

我正在使用openERP 8(odoo),我在这里安装了odoo

/opt/odoo

然后安装erp模块

/opt/odoo/addons/opencart_erp_connector
/opt/odoo/addons/opencart_openerp_stock

当我从中更新列表时 更新模块列表

我明白了

Odoo
Odoo Server Error
Traceback (most recent call last):
  File "/opt/odoo/openerp/http.py", line 517, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/openerp/http.py", line 538, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/openerp/http.py", line 294, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/openerp/http.py", line 291, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/odoo/openerp/http.py", line 754, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/openerp/http.py", line 387, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/addons/web/controllers/main.py", line 953, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/odoo/addons/web/controllers/main.py", line 941, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/opt/odoo/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/openerp/api.py", line 391, in old_api
    result = new_api(recs, *args, **kwargs)
  File "/opt/odoo/openerp/api.py", line 395, in new_api
    result = [method(rec, *args, **kwargs) for rec in self]
  File "/opt/odoo/openerp/addons/base/module/wizard/base_module_update.py", line 15, in update_module
    self.updated, self.added = self.env['ir.module.module'].update_list()
  File "/opt/odoo/openerp/api.py", line 235, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/openerp/api.py", line 464, in new_api
    result = method(self._model, cr, uid, *args, **kwargs)
  File "/opt/odoo/openerp/addons/base/module/module.py", line 654, in update_list
    handler.load_addons()
  File "/opt/odoo/openerp/http.py", line 1254, in load_addons
    m = __import__('openerp.addons.' + module)
  File "/opt/odoo/openerp/modules/module.py", line 77, in load_module
    mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
  File "/opt/odoo/addons/opencart_erp_connector/__init__.py", line 21, in <module>
    import core_updated_files
  File "/opt/odoo/addons/opencart_erp_connector/core_updated_files.py", line 23, in <module>
    import pooler
ImportError: No module named pooler

将不胜感激任何帮助 感谢

3 个答案:

答案 0 :(得分:0)

好的,请在account_test.py进行一些小改动,从from openerp import pooler添加导入文件。保存并重新启动服务器。

答案 1 :(得分:0)

问题在于此.py文件

/opt/odoo/addons/opencart_erp_connector/core_updated_files.py

现在转到上面的路径(第23行)并更改导入语句

import pooler 

from openerp import pooler

重新启动服务器并刷新浏览器。

希望这能解决您的问题。

答案 2 :(得分:0)

自定义模块的文件结构是什么? 你能给我们提供文件名和一些代码吗?

应该是这样的:

__init__.py
__pooler__.py
pooler.py

__ init __。py 应包含:

import pooler