问题描述
我想连接woocommerce和odoo.我在Odoo中安装woocommmerce连接器时遇到问题.我从 https://github.com/OCA/connector-woocommerce 获得了woocommerce连接器.我已将此模块上传到odoo的addons文件夹中.当我尝试更新odoo中的模块列表时,出现此错误:
i want to connect woocommerce and odoo. i have problem with woocommmerce connector installation in Odoo. i got the woocommerce connector from https://github.com/OCA/connector-woocommerce . i have upload this module into addons folder in odoo.. When i tried to update the module list in odoo, i got this error:
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
.
It seems like you do not have installed woocommerce REST api
on your system.
使用终端安装woocommerce.这是命令
install woocommerce using your terminal. here is the command
sudo pip install woocommerce
在终端中打开python提示
Open python prompt in terminal
$ 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存在一些安装问题.
If it says No module named woocommerce means you have some installation issue with woocommerce.
这篇关于在odoo中安装woocommerce连接器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!