From b1a339dd33128b98b7a9f23ba462f8c5f67ebc99 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 27 Aug 2019 10:58:40 +0200 Subject: [PATCH] add patch for drawer opening --- iotbox/Dockerfile | 4 +++- iotbox/patches/remove_get_printer_status.patch | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 iotbox/patches/remove_get_printer_status.patch diff --git a/iotbox/Dockerfile b/iotbox/Dockerfile index 793824c..22e2a07 100644 --- a/iotbox/Dockerfile +++ b/iotbox/Dockerfile @@ -87,7 +87,9 @@ RUN patch -p0 /usr/local/lib/python3.5/dist-packages/v4l2.py < /tmp/python-v4l2 # Disable log messages about disconnected drivers - unneeded and clutters logfile with useless messages && patch -p0 /usr/lib/python3/dist-packages/odoo/addons/hw_escpos/controllers/main.py < /tmp/disable-disconnected-logging.patch \ # Add cashbox networking support - && patch -p0 /opt/posbox/addons/hw_printer_network/controllers/hw_printer_network_controller.py < /tmp/cashbox-net.patch + && patch -p0 /opt/posbox/addons/hw_printer_network/controllers/hw_printer_network_controller.py < /tmp/cashbox-net.patch \ + # Remove fix from https://github.com/odoo/odoo/pull/35368 as this breaks network printing + && patch -p0 /usr/lib/python3/dist-packages/odoo/addons/hw_escpos/escpos/escpos.py < /tmp/remove_get_printer_status.patch ## Cannot switch to Odoo as CUPS must run as root and CUPS must run - otherwise IoTBox complains #USER odoo diff --git a/iotbox/patches/remove_get_printer_status.patch b/iotbox/patches/remove_get_printer_status.patch new file mode 100644 index 0000000..1c4ee13 --- /dev/null +++ b/iotbox/patches/remove_get_printer_status.patch @@ -0,0 +1,11 @@ +--- escpos.py.orig 2019-08-27 10:48:53.402884574 +0200 ++++ escpos.py 2019-08-27 10:49:01.762946864 +0200 +@@ -908,8 +908,6 @@ + else: + raise CashDrawerError() + +- self.get_printer_status() +- + def hw(self, hw): + """ Hardware operations """ + if hw.upper() == "INIT":