![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/odoo-pos-driver)
![PyPI - Downloads](https://img.shields.io/pypi/dm/odoo-pos-driver)
![GitLab last commit](https://img.shields.io/gitlab/last-commit/60778766)
![GitLab stars](https://img.shields.io/gitlab/stars/60778766?style=social)
[![Socket Badge](https://socket.dev/api/badge/pypi/package/odoo-pos-driver)](https://socket.dev/pypi/package/odoo-pos-driver)
# Odoo POS Driver
This tools is intented to be used with the Odoo Point of sale application. It replaces the Odoo [IoT Box](https://www.odoo.com/app/iot) or the
Community [pywebdriver](https://github.com/pywebdriver/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](#run)
2. [Usage](#usage)
3. [Installation](#installation)
4. [Related Odoo Modules](#related-odoo-modules)
5. [Compatible Devices](#compatible-devices)
6. [How to Contribute](#how-to-contribute)
7. [Development](#development)
7. [Roadmap and Known Issues](#roadmap-and-known-issues)
8. [Credits](#credits)
## <div id="run">Run</div>
```shell
odoo-tools-grap\
--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.
## <div id="usage">Usage</div>
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](https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/odoo_pos_driver/static/readme/security_exception.png)
Pages are available to test connections, see errors, etc.
![home_page](https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/odoo_pos_driver/static/readme/home_page.png)
## <div id="installation">Installation</div>
### Installation (to run it manually)
* install the latest released version:
```shell
pipx install odoo-pos-driver
```
* _or_ Install the latest version:
```shell
pipx install git+https://gitlab.com/grap-rhone-alpes/odoo-pos-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-pos-driver in the background and launches at startup.
```shell
wget https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/install_debian.sh
# (OPTIONAL) adapt the installation script before execution
# adding specific argument in the call of odoo-pos-driver in the .service file
sudo sh install_debian.sh
```
Once installed, you can run the following system command.
```shell
# Get status of the service
sudo systemctl status odoo-pos-driver.service
# Follow the logs of the service
sudo journalctl -fu odoo-pos-driver.service
```
## <div id="related-odoo-modules">Related Odoo Modules</div>
Compatibility of the library with Odoo Modules, depending on the version.
### V16
- Printer (+ Cashbox): ``point_of_sale`` (Odoo CE)
- Display: [``pos_odoo_driver_display``](https://github.com/grap/odoo-addons-pos)
- Payment: [``pos_odoo_driver_payment``](https://github.com/grap/odoo-addons-pos)
- Scale: ``point_of_sale`` (Odoo CE)
## <div id="compatible-devices">Compatible Devices</div>
<table style="width: 100%;">
<tbody>
<tr>
<th colspan="2"><h3>Printers</h3></th>
</tr>
<tr>
<td>
<li>
Epson - TM-T20II<br/>
Epson - TM-T20III
</li>
</td>
<td>
<img src="https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/odoo_pos_driver/static/devices/printer__epson__tm_t20.png" width="200" height="200" />
</td>
</tr>
<tr>
<th colspan="2"><h3>Display</h3></th>
</tr>
<tr>
<td>Aures - OCD 300</td>
<td>
<img src="https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/odoo_pos_driver/static/devices/display__aures__ocd_300.png" width="200" height="200" />
</td>
</tr>
<tr>
<th colspan="2"><h3>Payment Terminal</h3></th>
</tr>
<tr>
<td>Ingenico - Move/5000</td>
<td>
<img src="https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/odoo_pos_driver/static/devices/payment__ingenico__move_5000.png" width="200" height="200" />
</td>
</tr>
<tr>
<th colspan="2"><h3>Scale</h3></th>
</tr>
<tr>
<td>Mettler Toledo - Ariva S</td>
<td>
<img src="https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/odoo_pos_driver/static/devices/scale__mettler_toledo__ariva_s.png" width="200" height="200" />
</td>
</tr>
</tbody>
</table>
## <div id="how-to-contribute">How to Contribute</div>
### 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.
## <div id="development">Development</div>
See the dedicated section [here](https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/blob/main/DEVELOP.md).
## <div id="roadmap-and-known-issues">Roadmap and Known Issues</div>
See the dedicated section [here](https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/blob/main/ROADMAP.md).
## <div id="credits">Credits</div>
### Authors
* GRAP <https://www.grap.coop>
### Contributors
* Sylvain LE GAL <sylvain.legal@grap.coop>
### Extra authorship
Part of the code in this project comes from the following projects, including:
* [Pywebdriver](https://github.com/pywebdriver/pywebdriver) (AGPL-3.0), by GRAP. Main contributors are:
* Sylvain LE GAL <sylvain.legal@grap.coop>
* Sylvain CALADOR <sylvain.calador@akretion.com>
* Sébastien BEAU <sebastien.beau@akretion.com>
* Carmen BIANCA BAKKER <carmen@coopiteasy.be>
* Alexis DE LATTRE <alexis.delattre@akretion.com>
* Quentin DUPONT <quentin.dupont@grap.coop>
* Pierrick BRUN <pierrick.brun@akretion.com>
* Hugues DE KEYZER <hugues@coopiteasy.be>
* [hw_dialog06_scale](https://github.com/coopiteasy/iot/tree/12.0-dialog06/hw_dialog06_scale) (AGPL-3.0), by Coop It Easy. Main contributors are:
* Vincent Van Rossem <vincent.vanrossem@camptocamp.com>
* [pyposdisplay](https://github.com/akretion/pyposdisplay) (AGPL-3.0), by Akretion. Main contributors are:
* Alexis DE LATTRE <alexis.delattre@akretion.com>
* Sébastien BEAU <sebastien.beau@akretion.com>
The following projects were also useful and were studied to realize this library.
* [Odoo](https://github.com/odoo/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
* [Main Application icon](https://www.flaticon.com/fr/icones-gratuites/hub-usb), by AbtoCreative (Flaticon).
* [Credit Card Payment Terminal Icon](https://www.flaticon.com/fr/icone-gratuite/terminal-de-paiement_6137350), created by ToZ Icon (Flaticon).
* [LCD Customer Display Icon](https://www.flaticon.com/fr/icone-gratuite/lcd_9622586), created by Iconic Panda (Flaticon).
* [Thermal Receipt Printer Icon](https://www.flaticon.com/fr/icone-gratuite/facture_1649343), created by Icongeek26 (Flaticon).
* [Scale Icon](https://www.flaticon.com/fr/icone-gratuite/pesee_1104592), created by itim2101 (Flaticon).
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/grap-rhone-alpes/odoo-pos-driver",
"name": "odoo-pos-driver",
"maintainer": "Sylvain LE GAL",
"docs_url": null,
"requires_python": "<4.0.0,>=3.9",
"maintainer_email": "sylvain.legal@grap.coop",
"keywords": "Odoo, Point Of Sale, Driver",
"author": "Sylvain LE GAL",
"author_email": "sylvain.legal@grap.coop",
"download_url": "https://files.pythonhosted.org/packages/97/45/303aa74b6bf6582023588268a7775907c1b9375c4b651ef23d927e3b676f/odoo_pos_driver-0.9.6.tar.gz",
"platform": null,
"description": "![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/odoo-pos-driver)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/odoo-pos-driver)\n![GitLab last commit](https://img.shields.io/gitlab/last-commit/60778766)\n![GitLab stars](https://img.shields.io/gitlab/stars/60778766?style=social)\n[![Socket Badge](https://socket.dev/api/badge/pypi/package/odoo-pos-driver)](https://socket.dev/pypi/package/odoo-pos-driver)\n\n# Odoo POS Driver\n\nThis tools is intented to be used with the Odoo Point of sale application. It replaces the Odoo [IoT Box](https://www.odoo.com/app/iot) or the\nCommunity [pywebdriver](https://github.com/pywebdriver/pywebdriver) library.\n\nOnce installed locally in the cashier computer, devices will be discovered by the tool,\nonce plugged, and communication can be done with the Odoo Point of Sale module.\n\n# Table of contents\n\n1. [Run](#run)\n2. [Usage](#usage)\n3. [Installation](#installation)\n4. [Related Odoo Modules](#related-odoo-modules)\n5. [Compatible Devices](#compatible-devices)\n6. [How to Contribute](#how-to-contribute)\n7. [Development](#development)\n7. [Roadmap and Known Issues](#roadmap-and-known-issues)\n8. [Credits](#credits)\n\n## <div id=\"run\">Run</div>\n\n```shell\nodoo-tools-grap\\\n --address 0.0.0.0\\\n --port 8069\\\n --secure\\\n --refresh-devices-delay 1\\\n --log-level INFO\\\n --log-folder false\\\n --options EXTRA_OPTIONS\n```\n\n(The values displayed above are the default values.\n\n* ``-a / --address``: address where the web service will be available\n\n* ``-p / --port``: port where the web service will be available\n\n* ``--secure/--unsecure``: expose webservice with https\n (or http, if ``--unsecure`` is selected).\n\n* ``-r / --refresh-devices-delay``: interval in seconds\n between two checks of devices connected to usb ports.\n\n* ``-l / --log-level``: Possible values:\n ``TRACE`` / ``DEBUG`` / ``INFO`` / ``SUCCESS`` /\n ``WARNING`` / ``ERROR`` / ``CRITICAL``.\n Note:\n - ``TRACE`` will log all the http call.\n - ``DEBUG`` will log all the data received, including images received by the\n printer device.\n - Use ``INFO`` level or higher in production outside a debugging situation.\n\n* ``-f / --log-folder``: Optional directory that will contains logs.\n If defined, it should exist and be writable.\n\n* ``--options``: Json formatted data to pass to devices. Ex:\n ``'{\"scale\": {\"polynomial\": 123456}}'``\n That will pass the polynomial value to the scale device.\n Note: don't forget the simple quote at the beginning and the end of the\n dictionnary.\n\n## <div id=\"usage\">Usage</div>\n\nGo the home page of the tool, via https://localhost:8069.\n\nIf you choose https deployment, you should accept the first time\na security exception in your browser.\n\n![security_exception](https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/odoo_pos_driver/static/readme/security_exception.png)\n\n\nPages are available to test connections, see errors, etc.\n\n![home_page](https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/odoo_pos_driver/static/readme/home_page.png)\n\n## <div id=\"installation\">Installation</div>\n\n### Installation (to run it manually)\n\n* install the latest released version:\n\n```shell\npipx install odoo-pos-driver\n```\n\n* _or_ Install the latest version:\n\n```shell\npipx install git+https://gitlab.com/grap-rhone-alpes/odoo-pos-driver.git\n```\n\nNote: use ``--python python3.9`` (or higher) option, if your default python environment is under python 3.9 version.\n\n### Installation (as a service)\n\nThis will create a service (via systemd) that will execute odoo-pos-driver in the background and launches at startup.\n\n```shell\nwget https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/install_debian.sh\n# (OPTIONAL) adapt the installation script before execution\n# adding specific argument in the call of odoo-pos-driver in the .service file\nsudo sh install_debian.sh\n```\n\nOnce installed, you can run the following system command.\n\n```shell\n# Get status of the service\nsudo systemctl status odoo-pos-driver.service\n\n# Follow the logs of the service\nsudo journalctl -fu odoo-pos-driver.service\n```\n\n## <div id=\"related-odoo-modules\">Related Odoo Modules</div>\n\nCompatibility of the library with Odoo Modules, depending on the version.\n\n### V16\n\n- Printer (+ Cashbox): ``point_of_sale`` (Odoo CE)\n\n- Display: [``pos_odoo_driver_display``](https://github.com/grap/odoo-addons-pos)\n\n- Payment: [``pos_odoo_driver_payment``](https://github.com/grap/odoo-addons-pos)\n\n- Scale: ``point_of_sale`` (Odoo CE)\n\n## <div id=\"compatible-devices\">Compatible Devices</div>\n\n<table style=\"width: 100%;\">\n <tbody>\n <tr>\n <th colspan=\"2\"><h3>Printers</h3></th>\n </tr>\n <tr>\n <td>\n <li>\n Epson - TM-T20II<br/>\n Epson - TM-T20III\n </li>\n </td>\n <td>\n <img src=\"https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/odoo_pos_driver/static/devices/printer__epson__tm_t20.png\" width=\"200\" height=\"200\" />\n </td>\n </tr>\n <tr>\n <th colspan=\"2\"><h3>Display</h3></th>\n </tr>\n <tr>\n <td>Aures - OCD 300</td>\n <td>\n <img src=\"https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/odoo_pos_driver/static/devices/display__aures__ocd_300.png\" width=\"200\" height=\"200\" />\n </td>\n </tr>\n <tr>\n <th colspan=\"2\"><h3>Payment Terminal</h3></th>\n </tr>\n <tr>\n <td>Ingenico - Move/5000</td>\n <td>\n <img src=\"https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/odoo_pos_driver/static/devices/payment__ingenico__move_5000.png\" width=\"200\" height=\"200\" />\n </td>\n </tr>\n <tr>\n <th colspan=\"2\"><h3>Scale</h3></th>\n </tr>\n <tr>\n <td>Mettler Toledo - Ariva S</td>\n <td>\n <img src=\"https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/raw/main/odoo_pos_driver/static/devices/scale__mettler_toledo__ariva_s.png\" width=\"200\" height=\"200\" />\n </td>\n </tr>\n </tbody>\n</table>\n\n## <div id=\"how-to-contribute\">How to Contribute</div>\n\n### Welcome contributions\n\n* If the project is not translated into your language,\n you can propose a translation.\n\n* If you've encountered a problem or bug that you've solved,\n the patch will be very welcome !\n\n### Unwelcome contributions\n\nPlease **do not propose** a Merge Request before opening first an issue on gitlab,\nif you want to add new feature, new devices, etc.\n\nMaintaining a driver library is an impossible task if you don't own the device.\nIf the device or the feature you propose is not in the Roadmap of the GRAP company,\nit will be refused, to avoid rising technical debt.\n\nIn that case, do not hesitate to fork the project, to implement your change\nin a dedicated branch.\n\n## <div id=\"development\">Development</div>\n\nSee the dedicated section [here](https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/blob/main/DEVELOP.md).\n\n## <div id=\"roadmap-and-known-issues\">Roadmap and Known Issues</div>\n\nSee the dedicated section [here](https://gitlab.com/grap-rhone-alpes/odoo-pos-driver/-/blob/main/ROADMAP.md).\n\n## <div id=\"credits\">Credits</div>\n\n### Authors\n\n* GRAP <https://www.grap.coop>\n\n### Contributors\n\n* Sylvain LE GAL <sylvain.legal@grap.coop>\n\n### Extra authorship\n\nPart of the code in this project comes from the following projects, including:\n\n * [Pywebdriver](https://github.com/pywebdriver/pywebdriver) (AGPL-3.0), by GRAP. Main contributors are:\n\n * Sylvain LE GAL <sylvain.legal@grap.coop>\n * Sylvain CALADOR <sylvain.calador@akretion.com>\n * S\u00e9bastien BEAU <sebastien.beau@akretion.com>\n * Carmen BIANCA BAKKER <carmen@coopiteasy.be>\n * Alexis DE LATTRE <alexis.delattre@akretion.com>\n * Quentin DUPONT <quentin.dupont@grap.coop>\n * Pierrick BRUN <pierrick.brun@akretion.com>\n * Hugues DE KEYZER <hugues@coopiteasy.be>\n\n * [hw_dialog06_scale](https://github.com/coopiteasy/iot/tree/12.0-dialog06/hw_dialog06_scale) (AGPL-3.0), by Coop It Easy. Main contributors are:\n\n * Vincent Van Rossem <vincent.vanrossem@camptocamp.com>\n\n * [pyposdisplay](https://github.com/akretion/pyposdisplay) (AGPL-3.0), by Akretion. Main contributors are:\n\n * Alexis DE LATTRE <alexis.delattre@akretion.com>\n * S\u00e9bastien BEAU <sebastien.beau@akretion.com>\n\nThe following projects were also useful and were studied to realize this library.\n\n * [Odoo](https://github.com/odoo/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.\n\n### Images\n\n* [Main Application icon](https://www.flaticon.com/fr/icones-gratuites/hub-usb), by AbtoCreative (Flaticon).\n\n* [Credit Card Payment Terminal Icon](https://www.flaticon.com/fr/icone-gratuite/terminal-de-paiement_6137350), created by ToZ Icon (Flaticon).\n\n* [LCD Customer Display Icon](https://www.flaticon.com/fr/icone-gratuite/lcd_9622586), created by Iconic Panda (Flaticon).\n\n* [Thermal Receipt Printer Icon](https://www.flaticon.com/fr/icone-gratuite/facture_1649343), created by Icongeek26 (Flaticon).\n\n* [Scale Icon](https://www.flaticon.com/fr/icone-gratuite/pesee_1104592), created by itim2101 (Flaticon).\n",
"bugtrack_url": null,
"license": null,
"summary": " Python library to communicates with devices used by the Odoo Point of Sale application.Alternative to Iot Box Odoo solution or Pywebdriver community solution.",
"version": "0.9.6",
"project_urls": {
"Homepage": "https://gitlab.com/grap-rhone-alpes/odoo-pos-driver",
"Repository": "https://gitlab.com/grap-rhone-alpes/odoo-pos-driver"
},
"split_keywords": [
"odoo",
" point of sale",
" driver"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cd58f2e3f3333e0c3540b9e721e846e3691b94c234a1357232f778281f6b20ce",
"md5": "6f525350b5e2afac1266a1aaf8f61e37",
"sha256": "9f190d60e09b9132c62328550baa7749b364e048c4743e2a33ac55c3e630de0e"
},
"downloads": -1,
"filename": "odoo_pos_driver-0.9.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6f525350b5e2afac1266a1aaf8f61e37",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.9",
"size": 1092475,
"upload_time": "2024-09-27T11:10:02",
"upload_time_iso_8601": "2024-09-27T11:10:02.268633Z",
"url": "https://files.pythonhosted.org/packages/cd/58/f2e3f3333e0c3540b9e721e846e3691b94c234a1357232f778281f6b20ce/odoo_pos_driver-0.9.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9745303aa74b6bf6582023588268a7775907c1b9375c4b651ef23d927e3b676f",
"md5": "7a7295df32c55cb70b592290acd31e52",
"sha256": "bca1b9c7c620b757a7a0229583f571ca0f7e9dc591d33ebdae21a138829ecbf9"
},
"downloads": -1,
"filename": "odoo_pos_driver-0.9.6.tar.gz",
"has_sig": false,
"md5_digest": "7a7295df32c55cb70b592290acd31e52",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.9",
"size": 1082370,
"upload_time": "2024-09-27T11:10:04",
"upload_time_iso_8601": "2024-09-27T11:10:04.680780Z",
"url": "https://files.pythonhosted.org/packages/97/45/303aa74b6bf6582023588268a7775907c1b9375c4b651ef23d927e3b676f/odoo_pos_driver-0.9.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-27 11:10:04",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "grap-rhone-alpes",
"gitlab_project": "odoo-pos-driver",
"lcname": "odoo-pos-driver"
}