wordpress – 在odoo中安装woocommerce连接器

我想连接woocommerce和odoo.我在Odoo的woocommmerce连接器安装有问题.我从
https://github.com/OCA/connector-woocommerce获得了woocommerce连接器.我已将此模块上传到odoo中的addons文件夹中.当我尝试更新odoo中的模块列表时,我收到此错误:

    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 113, 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 241, in wrapper
       return old_api(self, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 393, in old_api
       result = new_api(recs, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 397, in new_api
       result = [method(rec, *args, **kwargs) for rec in self]
    File "/usr/lib/python2.7/dist-packages/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 "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper
       return new_api(self, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 462, in new_api
       result = method(self._model, cr, uid, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 654, in update_list
       handler.load_addons()
    File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1308, in load_addons
       m = __import__('openerp.addons.' + module)
    File "/usr/lib/python2.7/dist-packages/openerp/modules/module.py", line 80, in load_module
       mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
    File "/usr/lib/python2.7/dist-packages/openerp/addons/connector_woocommerce/__init__.py", line 22, in <module>
       from . import model
    File "/usr/lib/python2.7/dist-packages/openerp/addons/connector_woocommerce/model/__init__.py", line 22, in <module>
       from . import backend
    File "/usr/lib/python2.7/dist-packages/openerp/addons/connector_woocommerce/model/backend.py", line 23, in <module>
       from woocommerce import API

    ImportError: No module named woocommerce

最佳答案 您好像没有在系统上安装woocommerce REST api.

使用您的终端安装woocommerce.这是命令

sudo pip install woocommerce

编辑:

在终端中打开python提示符

$python
Python 2.7.3 (default, Mar 13 2014, 11:03:55) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from woocommerce import API
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named woocommerce

如果它说没有名为woocommerce的模块意味着你有一些与woocommerce的安装问题.

点赞