Skip to main content

Python library to communicates with devices used by Odoo.(Mainly Point of Sale application)Alternative to Iot Box Odoo solution or Pywebdriver community solution.

Project description

Odoo Drivers

License: AGPL v3 PyPI - Python Version PyPI - Downloads GitLab last commit GitLab stars

This tools is intented to be used with the Odoo Point of sale application. It replaces the Odoo IoT Box or the Community pywebdriver library.

Once installed locally in the cashier computer, devices will be discovered by the tool, once plugged, and communication can be done with the Odoo Point of Sale module.

Table of contents

  1. Run
  2. Usage
  3. Installation
  4. Compatible Plugins
  5. How to Contribute
  6. Development
  7. Credits

Run

odoo-driver\
  --address 0.0.0.0\
  --port 8069\
  --secure\
  --refresh-devices-delay 1\
  --log-level INFO\
  --log-folder false

(The values displayed above are the default values.

  • -a / --address: address where the web service will be available

  • -p / --port: port where the web service will be available

  • --secure/--unsecure: expose webservice with https (or http, if --unsecure is selected).

  • -r / --refresh-devices-delay: interval in seconds between two checks of devices connected to usb ports.

  • -l / --log-level: Possible values: DEBUG / INFO / SUCCESS / WARNING / ERROR / CRITICAL.

Note: DEBUG will log all the data received, including images received by the printer device. Use INFO level or higher in production outside a debugging situation.

  • -f / --log-folder: Optional directory that will contains logs. If defined, it should exist and be writable.

Usage

Go the home page of the tool, via https://localhost:8069.

If you choose https deployment, you should accept the first time a security exception in your browser.

security_exception

Pages are available to test connections, see errors, etc.

home_page

Installation

Run it manually

  • install the latest released version:
pipx install odoo-driver
  • or Install the latest version:
pipx install git+https://gitlab.com/grap-rhone-alpes/odoo-driver.git

Note: use --python python3.9 (or higher) option, if your default python environment is under python 3.9 version.

Run it as a service

This will create a service (via systemd) that will execute odoo-driver in the background and launches at startup.

wget https://gitlab.com/grap-rhone-alpes/odoo-driver/-/raw/main/debian_install.sh
# (OPTIONAL) adapt the installation script before execution
# adding specific argument in the call of odoo-driver in the .service file
sudo sh debian_install.sh

Once installed, you can run the following system command.

# Get status of the service
sudo systemctl status odoo-driver.service

# Follow the logs of the service
sudo journalctl -fu odoo-driver.service

Compatible Plugins

Function Protocol URL
Printers ESC/POS odoo-driver-plugin-printer-escpos
Payment Terminals Telium odoo-driver-plugin-payment-telium
LCD Displays ESC/POS odoo-driver-plugin-display-escpos
Scale Toledo odoo-driver-plugin-scale-toledo

How to Contribute

Welcome contributions

  • If the project is not translated into your language, you can propose a translation. (Refer to the update_translation.sh helper script.)

  • If you tested a plugin with a driver that is not referenced in the usb_devices.py file, and if all works correctly, please feel free to make an Merge Request, to mark this device as compatible. (add an image, make a change in usb_devices.py and in the README.md files)

  • If you've encountered a problem or bug that you've solved, the patch will be very welcome !

  • If you face an issue and you have a budget, you can ask for a quotation to try to solve the problem.

Unwelcome contributions

  • Please do not use AI to propose Merge Requests and / or write issues. Such 'contributions' will be closed. (If you don't have time to contribute, don't ask time for review.)

  • Please do not propose a Merge Request before opening first an issue on gitlab, if you want to add new feature, new devices, etc.

Separate contributions

  • If you want to develop a plugin that is not developped, feel free to create a new project, named odoo-driver-plugin-FUNCTION-PROTOCOL. you can take example on the existing projects.

Development

See the dedicated section in this document.

Credits

Authors

Contributors

Extra authorship

Part of the code in this project comes from the following projects, including:

The following projects were also useful and were studied to realize this library.

  • Odoo (AGPL-3.0 up to version 8.0, and then LGPL-3.0 from version 9.0 onwards), by Odoo SA, specially "hw_" modules.

Images

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odoo_driver-2.0.0.tar.gz (153.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odoo_driver-2.0.0-py3-none-any.whl (158.9 kB view details)

Uploaded Python 3

File details

Details for the file odoo_driver-2.0.0.tar.gz.

File metadata

  • Download URL: odoo_driver-2.0.0.tar.gz
  • Upload date:
  • Size: 153.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.12.3 Linux/6.17.0-23-generic

File hashes

Hashes for odoo_driver-2.0.0.tar.gz
Algorithm Hash digest
SHA256 8dfc04e477dbe250db1bb3ab85f1aaf55ed239315db16ea78883d2efe6c5ec7d
MD5 3d42d7fa485baf9f04b446fc47faa556
BLAKE2b-256 2386e091a68e969eb085e245f900974103f797ad1e9a0b6afa852cab9154a18c

See more details on using hashes here.

File details

Details for the file odoo_driver-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: odoo_driver-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 158.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.4 CPython/3.12.3 Linux/6.17.0-23-generic

File hashes

Hashes for odoo_driver-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 271597be71eb5f6dbe5806d926c9a8ee01fac32203b52dee4f083527241ade74
MD5 9344798312a5404fa9c22b1268cd8821
BLAKE2b-256 a279ea9bc49030ab02d338d4b10fce40bc2e4aebaa2b4fbe964a3229d457a992

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page