Odoo-在同一树莓中运行服务器和Posbox

时间:2018-08-14 15:56:16

标签: raspberry-pi odoo odoo-10 odoo-11

我已经安装了稳定的Odoo v.11。该软件运行正常。

现在,我想在同一台计算机上安装和配置PosBox。为此,我使用了官方指南:

https://www.odoo.com/documentation/user/10.0/point_of_sale/overview/setup.html#id2

显然安装很好。

但是当我运行此命令时:

odoo --load=web,hw_proxy,hw_posbox_homepage,hw_posbox_upgrade,hw_scale,hw_scanner,hw_escpos

它在日志文件中显示此错误:

2018-08-14 15:36:51,051 1004 INFO ? odoo: Odoo version 11.0-20180814
2018-08-14 15:36:51,055 1004 INFO ? odoo: addons paths: ['/home/pi/.local/share/Odoo/addons/11.0', '/usr/lib/python3/dist-packages/odoo/addons']
2018-08-14 15:36:51,057 1004 INFO ? odoo: database: default@default:default
fatal: Not a git repository: '/home/pi/odoo/.git'
2018-08-14 15:36:51,144 1004 CRITICAL ? odoo.modules.module: Couldn't load module hw_posbox_upgrade
2018-08-14 15:36:51,145 1004 CRITICAL ? odoo.modules.module: Command 'git --work-tree=/home/pi/odoo/ --git-dir=/home/pi/odoo/.git log -1' returned non-zero exit status 128
2018-08-14 15:36:51,146 1004 ERROR ? odoo.service.server: Failed to load server-wide module `hw_posbox_upgrade`.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 866, in load_server_wide_modules
    odoo.modules.module.load_openerp_module(m)
  File "/usr/lib/python3/dist-packages/odoo/modules/module.py", line 368, in load_openerp_module
    __import__('odoo.addons.' + module_name)
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
  File "/usr/lib/python3/dist-packages/odoo/modules/module.py", line 82, in load_module
    exec(open(modfile, 'rb').read(), new_mod.__dict__)
  File "<string>", line 4, in <module>
  File "/usr/lib/python3/dist-packages/odoo/addons/hw_posbox_upgrade/controllers/__init__.py", line 4, in <module>
    from . import main
  File "/usr/lib/python3/dist-packages/odoo/addons/hw_posbox_upgrade/controllers/main.py", line 83, in <module>
    upgrade_template += subprocess.check_output("git --work-tree=/home/pi/odoo/ --git-dir=/home/pi/odoo/.git log -1", shell=True).decode('utf-8').replace("\n", "<br/>")
  File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'git --work-tree=/home/pi/odoo/ --git-dir=/home/pi/odoo/.git log -1' returned non-zero exit status 128
2018-08-14 15:36:51,182 1004 ERROR ? odoo.addons.hw_scanner.controllers.main: Odoo module hw_scanner depends on the evdev python module
2018-08-14 15:36:51,199 1004 CRITICAL ? odoo.modules.module: Couldn't load module hw_escpos
2018-08-14 15:36:51,199 1004 CRITICAL ? odoo.modules.module: No module named 'netifaces'
2018-08-14 15:36:51,200 1004 ERROR ? odoo.service.server: Failed to load server-wide module `hw_escpos`.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 866, in load_server_wide_modules
    odoo.modules.module.load_openerp_module(m)
  File "/usr/lib/python3/dist-packages/odoo/modules/module.py", line 368, in load_openerp_module
    __import__('odoo.addons.' + module_name)
  File "/usr/lib/python3/dist-packages/odoo/modules/module.py", line 82, in load_module
    exec(open(modfile, 'rb').read(), new_mod.__dict__)
  File "<string>", line 4, in <module>
  File "/usr/lib/python3/dist-packages/odoo/addons/hw_escpos/controllers/__init__.py", line 4, in <module>
    from . import main
  File "/usr/lib/python3/dist-packages/odoo/addons/hw_escpos/controllers/main.py", line 11, in <module>
    import netifaces as ni
ImportError: No module named 'netifaces'
2018-08-14 15:36:51,215 1004 INFO ? odoo.service.server: HTTP service (werkzeug) running on webserver-pi:8069
2018-08-14 15:36:51,750 1004 INFO ? odoo.addons.base.ir.ir_actions_report: You need Wkhtmltopdf to print a pdf version of the reports.
2018-08-14 15:36:52,203 1004 WARNING ? odoo.addons.base.res.res_currency: The num2words python library is not installed, l10n_mx_edi features won't be fully available.
2018-08-14 15:36:54,795 1004 INFO ? odoo.addons.sms.wizard.send_sms: The `phonenumbers` Python module is not available. Phone number validation will be skipped. Try `pip3 install phonenumbers` to install it.
2018-08-14 15:36:55,730 1004 INFO ? odoo.http: HTTP Configuring static files
2018-08-14 15:36:55,748 1004 INFO ? odoo.sql_db: Connection to the database failed
2018-08-14 15:36:55,758 1004 INFO ? werkzeug: 192.168.0.4 - - [14/Aug/2018 15:36:55] "GET /hw_proxy/status HTTP/1.1" 500 -
2018-08-14 15:36:55,779 1004 ERROR ? werkzeug: Error on request:

我已经看到有关POSBOX模块的严重和错误,但是这些模块存在于addons目录中。

我不确定我是否已修改了odoo.conf以及插件的路径也可以。

请你能帮我吗?

1 个答案:

答案 0 :(得分:0)

我有两个问题:

1)Git存储库目录错误。它已移至/home/username/.git

2)我在Postgres中创建了一个用户和数据库,以便与运行odoo进程的同一用户一起运行。

谢谢!