如何在 Raspberry Pi 上安装 Odoo POSBox?
How to install Odoo POSBox on the Raspberry Pi?
我正在尝试在 Raspberry Pi 上安装 Odoo POSBox,你能帮我看看怎么做吗.我在网上看了一些教程,但没有任何效果。
您检查过这些参考资料了吗?
更新 - 从 link:
复制信息
Step By Step Setup Guide
Extra dependencies
Because Odoo runs on Python 2, you need to check which version of pip
you need to use.
# pip --version
If it returns something like::
pip 1.5.6 from /usr/local/lib/python3.3/dist-packages/pip-1.5.6-py3.3.egg (python 3.3)
You need to try pip2 instead. If it returns something like:
pip 1.4.1 from /usr/lib/python2.7/dist-packages (python 2.7)
You can use pip.
The driver modules requires the installation of new python modules:
# pip install pyserial
# pip install pyusb==1.0.0b1
# pip install qrcode
Access Rights
The drivers need raw access to the printer and barcode scanner
devices. Doing so requires a bit system administration. First we are
going to create a group that has access to USB devices
# groupadd usbusers
Then we add the user who will run the OpenERP server to usbusers
# usermod -a -G usbusers USERNAME
Then we need to create a udev rule that will automatically allow
members of usbusers
to access raw USB devices. To do so create a
file called 99-usbusers.rules
in the /etc/udev/rules.d/
directory with the following content::
SUBSYSTEM=="usb", GROUP="usbusers", MODE="0660"
SUBSYSTEMS=="usb", GROUP="usbusers", MODE="0660"
Then you need to reboot your machine.
Start the local Odoo instance
We must launch the Odoo server with the correct settings
$ ./odoo.py --load=web,hw_proxy,hw_posbox_homepage,hw_posbox_upgrade,hw_scale,hw_scanner,hw_escpos
Test the instance
Plug all your hardware to your machine's USB ports, and go to
http://localhost:8069/hw_proxy/status
refresh the page a few times
and see if all your devices are indicated as Connected. Possible
source of errors are: The paths on the distribution differ from the
paths expected by the drivers, another process has grabbed exclusive
access to the devices, the udev rules do not apply or a superseded by
others.
Automatically start Odoo
You must now make sure that this Odoo install is automatically started
after boot. There are various ways to do so, and how to do it depends
on your particular setup. Using the init system provided by your
distribution is probably the easiest way to accomplish this.
Setup the Point of Sale
The IP address field in the POS configuration must be either
127.0.0.1
or localhost
if you're running the created Odoo
server on the machine that you'll use as the Point of Sale device. You
can also leave it empty.
我正在尝试在 Raspberry Pi 上安装 Odoo POSBox,你能帮我看看怎么做吗.我在网上看了一些教程,但没有任何效果。
您检查过这些参考资料了吗?
更新 - 从 link:
复制信息Step By Step Setup Guide
Extra dependencies
Because Odoo runs on Python 2, you need to check which version of pip you need to use.
# pip --version
If it returns something like::
pip 1.5.6 from /usr/local/lib/python3.3/dist-packages/pip-1.5.6-py3.3.egg (python 3.3)
You need to try pip2 instead. If it returns something like: pip 1.4.1 from /usr/lib/python2.7/dist-packages (python 2.7) You can use pip. The driver modules requires the installation of new python modules: # pip install pyserial # pip install pyusb==1.0.0b1 # pip install qrcode
Access Rights
The drivers need raw access to the printer and barcode scanner devices. Doing so requires a bit system administration. First we are going to create a group that has access to USB devices
# groupadd usbusers
Then we add the user who will run the OpenERP server to
usbusers
# usermod -a -G usbusers USERNAME
Then we need to create a udev rule that will automatically allow members of
usbusers
to access raw USB devices. To do so create a file called99-usbusers.rules
in the/etc/udev/rules.d/
directory with the following content::SUBSYSTEM=="usb", GROUP="usbusers", MODE="0660" SUBSYSTEMS=="usb", GROUP="usbusers", MODE="0660"
Then you need to reboot your machine.
Start the local Odoo instance
We must launch the Odoo server with the correct settings
$ ./odoo.py --load=web,hw_proxy,hw_posbox_homepage,hw_posbox_upgrade,hw_scale,hw_scanner,hw_escpos
Test the instance
Plug all your hardware to your machine's USB ports, and go to
http://localhost:8069/hw_proxy/status
refresh the page a few times and see if all your devices are indicated as Connected. Possible source of errors are: The paths on the distribution differ from the paths expected by the drivers, another process has grabbed exclusive access to the devices, the udev rules do not apply or a superseded by others.Automatically start Odoo
You must now make sure that this Odoo install is automatically started after boot. There are various ways to do so, and how to do it depends on your particular setup. Using the init system provided by your distribution is probably the easiest way to accomplish this.
Setup the Point of Sale
The IP address field in the POS configuration must be either
127.0.0.1
orlocalhost
if you're running the created Odoo server on the machine that you'll use as the Point of Sale device. You can also leave it empty.