0
votes

I have installed the Odoo, stable v.11. The software is working fine.

Now I would like to install and configure PosBox in the same machine. For this I used the official guide:

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

Apparently the installation was fine.

But when I run this command:

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

It display this errors in the logfile:

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:

I have seen CRITICAL and ERRORS about the modules of the POSBOX but the modules exist in the addons directory.

I'm not sure of the problem I have revised the odoo.conf and the path of the addons it's fine too.

Please Could you help me?

1
Here you have multiple errors of dependency, missing libraries and some module are not compatible. Just check the access of git, install all necessary libraries and then run the same.Keval Mehta
The errors are about module and the addons path is correct: '/usr/lib/python3/dist-packages/odoo/addons'. I don't understand.ruzD
@KevalMehta but you are right about the git repository has a wrong path. The correct path would be /home/odoo/odoo/.git. How to change it?ruzD
clone repo in exact path so you don't need to change that .Keval Mehta

1 Answers

0
votes

I had two problems:

1) The Git repository was in wrong directory. It has moved to /home/username/.git

2) I have created a user & database in Postgres to run with the same user that run odoo process.

Thanks!