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

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

Odoo Drivers

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. Related Odoo Modules
  5. Compatible Devices
  6. How to Contribute
  7. Development
  8. Roadmap and Known Issues
  9. Credits

Run

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

(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: TRACE / DEBUG / INFO / SUCCESS / WARNING / ERROR / CRITICAL. Note:

    • TRACE will log all the http call.
    • 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.

  • --options: Json formatted data to pass to devices. Ex: '{"scale": {"polynomial": 123456}}' That will pass the polynomial value to the scale device. Note: don't forget the simple quote at the beginning and the end of the dictionnary.

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

Installation (to run it manually)

  • install the latest released version:
pipx install odoo-driver
```odoo

* _or_ Install the latest version:

```shell
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.

Installation (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

Compatibility of the library with Odoo Modules, depending on the version.

V16

Compatible Devices

Printers

  • Epson - TM-T20II
    Epson - TM-T20III
    Epson - TM-T88V
  • Display

    Aures - OCD 300

    Payment Terminal

    Ingenico - Move/5000

    Scale

    Mettler Toledo - Ariva S

    How to Contribute

    Welcome contributions

    • If the project is not translated into your language, you can propose a translation.

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

    Unwelcome contributions

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

    Maintaining a driver library is an impossible task if you don't own the device. If the device or the feature you propose is not in the Roadmap of the GRAP company, it will be refused, to avoid rising technical debt.

    In that case, do not hesitate to fork the project, to implement your change in a dedicated branch.

    Development

    See the dedicated section here.

    Roadmap and Known Issues

    See the dedicated section here.

    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-0.9.12.tar.gz (1.4 MB view details)

    Uploaded Source

    Built Distribution

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

    odoo_driver-0.9.12-py3-none-any.whl (1.4 MB view details)

    Uploaded Python 3

    File details

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

    File metadata

    • Download URL: odoo_driver-0.9.12.tar.gz
    • Upload date:
    • Size: 1.4 MB
    • Tags: Source
    • Uploaded using Trusted Publishing? No
    • Uploaded via: poetry/1.5.1 CPython/3.7.17 Linux/5.15.0-126-generic

    File hashes

    Hashes for odoo_driver-0.9.12.tar.gz
    Algorithm Hash digest
    SHA256 ac81eab85e0c1ebc24a6c5964c20e55d6f3e9e10e3dd4171f91ca79b97efa0e7
    MD5 240edbeb30530a65ca44079d4ee9b7a2
    BLAKE2b-256 2925f6831faa00725b401ec648a7a4e2e9b2e75412ea10331e2bb8e7f7d7519d

    See more details on using hashes here.

    File details

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

    File metadata

    • Download URL: odoo_driver-0.9.12-py3-none-any.whl
    • Upload date:
    • Size: 1.4 MB
    • Tags: Python 3
    • Uploaded using Trusted Publishing? No
    • Uploaded via: poetry/1.5.1 CPython/3.7.17 Linux/5.15.0-126-generic

    File hashes

    Hashes for odoo_driver-0.9.12-py3-none-any.whl
    Algorithm Hash digest
    SHA256 b67cbd7dbfe8258ecf3102cd0bee8f5840aec9307f3c17814cf463624e816a4d
    MD5 06547553c70d8e0ffb7471705de68203
    BLAKE2b-256 f86da4f3b604627ac0e21bd839940d1994661f26bc01fe3edbe5dfc3bb0e1751

    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