2019-07-23 18:55:53 +00:00
|
|
|
# Odoo Pos Distribution
|
2018-07-11 20:23:19 +00:00
|
|
|
|
2019-07-23 18:55:53 +00:00
|
|
|
Dockerfiles, Docker Compose and Kubernetes configuration for running an Odoo based PoS
|
|
|
|
in container and Kubernets.
|
2019-06-30 14:58:29 +00:00
|
|
|
|
|
|
|
Additionally it contains [pos-addons](https://github.com/it-projects-llc/pos-addons)
|
2018-07-11 20:23:19 +00:00
|
|
|
for using receipt printers over the network.
|
2018-07-14 15:24:04 +00:00
|
|
|
|
2019-06-30 14:58:29 +00:00
|
|
|
## Quickstart
|
|
|
|
|
2019-07-23 18:55:53 +00:00
|
|
|
### Docker Compose
|
|
|
|
|
2019-06-30 14:58:29 +00:00
|
|
|
1. `docker-compose up`
|
2019-07-23 18:55:53 +00:00
|
|
|
|
|
|
|
Continue with "Odoo PoS configuration"
|
|
|
|
|
|
|
|
### Kubernetes / K3s
|
|
|
|
|
|
|
|
The provided YAML files have been developed and tested with [k3s](https://k3s.io/).
|
|
|
|
Installation will happen in the namespace `pos`.
|
|
|
|
|
|
|
|
1. Install [k3s](https://k3s.io/) (any other Kubernetes should work as well)
|
|
|
|
1. Install [local-path-provisioner](https://github.com/rancher/local-path-provisioner)
|
|
|
|
1. Apply the deployment YAMLs: `kubectl apply -f deployment/`
|
|
|
|
|
|
|
|
Continue with "Odoo PoS configuration"
|
|
|
|
|
|
|
|
## Odoo PoS configuration
|
|
|
|
|
2019-06-30 14:58:29 +00:00
|
|
|
1. Connect to Odoo and create a new database
|
2019-07-23 18:55:53 +00:00
|
|
|
On Kubernetes the Ingress defines the hostnames `pos` and `iotbox`
|
2019-06-30 14:58:29 +00:00
|
|
|
1. Install Odoo Apps:
|
|
|
|
* "Point of Sale"
|
|
|
|
* "POS Network Printer"
|
|
|
|
1. (Enable "Developer mode" under Odoo settings)
|
|
|
|
1. Configure PoS for IoT Box (see docs/iotbox-config.png)
|
|
|
|
1. Configure Order Printer (see docs/orderprinter.png)
|
|
|
|
|
2019-07-23 18:55:53 +00:00
|
|
|
## Hardware and Networking
|
|
|
|
|
|
|
|
* Default network assumed: `192.168.233.0/24`
|
|
|
|
* Printers: 192.168.233.3 and 192.168.233.5
|
|
|
|
* Printers used in this project: [Epson TM-T20II](https://www.epson.ch/products/sd/pos-printer/epson-tm-t20ii)
|
|
|
|
|
|
|
|
More hardware description and a network diagram: tbd.
|
|
|
|
|
2018-08-05 12:27:38 +00:00
|
|
|
## Backup configuration
|
|
|
|
|
|
|
|
Example contents of `backup.env`:
|
|
|
|
|
|
|
|
```
|
|
|
|
RESTIC_REPOSITORY=rclone:myremote:posbackup
|
|
|
|
RESTIC_PASSWORD=extremelysecurepassword
|
|
|
|
RCLONE_CONFIG_FWUCLOUD_TYPE=webdav
|
|
|
|
RCLONE_CONFIG_FWUCLOUD_URL=https://nextcloud.example.com/remote.php/webdav/
|
|
|
|
RCLONE_CONFIG_FWUCLOUD_VENDOR=nextcloud
|
|
|
|
RCLONE_CONFIG_FWUCLOUD_USER=backupuser
|
|
|
|
RCLONE_CONFIG_FWUCLOUD_PASS=encryptedpassword
|
|
|
|
PGDATABASE=odoodbname
|
|
|
|
```
|
|
|
|
|
|
|
|
Restore of DB:
|
|
|
|
|
|
|
|
```
|
|
|
|
createdb -T template0 restoretest
|
|
|
|
pg_restore -d restoretest /data/odoo_data.dump
|
|
|
|
```
|
2019-06-30 14:58:29 +00:00
|
|
|
|
|
|
|
## Notes
|
|
|
|
|
|
|
|
* Connection from PoS Tablet to IoT Box is a direct connection, not via Odoo server!
|
2019-06-30 15:04:42 +00:00
|
|
|
* Support for opening the cashbox via network printer has been patched. The IP is hardcoded
|
2019-06-30 15:05:36 +00:00
|
|
|
to 192.168.233.3. See [0c6ecfdd](https://github.com/tobru/posbox-docker/commit/0c6ecfdd470dad07b9f9c26ecc0fd413c6d605b1)
|
|
|
|
and [#730](https://github.com/it-projects-llc/pos-addons/issues/730).
|