From 604e8eb1a9ff8417811febed4e5e6358ad8b83e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89loi=20Rivard?= Date: Fri, 30 Aug 2019 17:25:31 +0200 Subject: [PATCH 1/2] [8.0][FIX] hw_telium_payment_terminal_status - print status, fix #372 --- hw_telium_payment_terminal/controllers/main.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw_telium_payment_terminal/controllers/main.py b/hw_telium_payment_terminal/controllers/main.py index d40232b0..e0bfe7bc 100644 --- a/hw_telium_payment_terminal/controllers/main.py +++ b/hw_telium_payment_terminal/controllers/main.py @@ -239,6 +239,15 @@ class TeliumPaymentTerminalDriver(Thread): self.device_name, self.device_rate, timeout=3) logger.debug('serial.is_open = %s' % self.serial.isOpen()) + + if self.serial.isOpen(): + self.set_status("connected", + "Connected to {}".format(self.device_name)) + else: + self.set_status("disconnected", + "Could not connect to {}" + .format(self.device_name)) + if self.initialize_msg(): data = self.prepare_data_to_send(payment_info_dict) if not data: @@ -257,6 +266,9 @@ class TeliumPaymentTerminalDriver(Thread): except Exception, e: logger.error('Exception in serial connection: %s' % str(e)) + self.set_status("error", + "Exception in serial connection to {}" + .format(self.device_name)) finally: if self.serial: logger.debug('Closing serial port for payment terminal') From 2c30916910bba82cd42a3385f63365cf36fea073 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 3 Sep 2019 21:03:54 +0000 Subject: [PATCH 2/2] hw_telium_payment_terminal 8.0.0.1.2 --- hw_telium_payment_terminal/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw_telium_payment_terminal/__openerp__.py b/hw_telium_payment_terminal/__openerp__.py index f9a052f0..fdfb436e 100644 --- a/hw_telium_payment_terminal/__openerp__.py +++ b/hw_telium_payment_terminal/__openerp__.py @@ -23,7 +23,7 @@ { 'name': 'Hardware Telium Payment Terminal', - 'version': '8.0.0.1.1', + 'version': '8.0.0.1.2', 'category': 'Hardware Drivers', 'license': 'AGPL-3', 'summary': 'Adds support for Payment Terminals using Telium protocol',