From 6aa0187ca304152def293ce59bf1ff79f67a6bc8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Fri, 21 Mar 2014 17:37:40 +0100 Subject: [PATCH] [IMP] posbox: print the homepage url on the status ticket bzr revid: fva@openerp.com-20140321163740-0o0b3ikmz6jv6cwr --- addons/hw_escpos/controllers/main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/hw_escpos/controllers/main.py b/addons/hw_escpos/controllers/main.py index 56c56a1..b647e5c 100644 --- a/addons/hw_escpos/controllers/main.py +++ b/addons/hw_escpos/controllers/main.py @@ -147,12 +147,15 @@ class EscposDriver(Thread): if len(ips) == 0: eprint.text('ERROR: Could not connect to LAN\n\nPlease check that the PosBox is correc-\ntly connected with a network cable,\n that the LAN is setup with DHCP, and\nthat network addresses are available') elif len(ips) == 1: - eprint.text('IP Address\n'+ips[0]+'\n') + eprint.text('IP Address:\n'+ips[0]+'\n') else: - eprint.text('IP Addresses\n') + eprint.text('IP Addresses:\n') for ip in ips: eprint.text(ip+'\n') + if len(ips) >= 1: + eprint.text('\nHomepage:\nhttp://'+ips[0]+':8069\n') + eprint.text('\n\n') eprint.cut() @@ -283,6 +286,8 @@ class EscposDriver(Thread): driver = EscposDriver() +driver.push_task('printstatus') + hw_proxy.drivers['escpos'] = driver class EscposProxy(hw_proxy.Proxy): -- 1.7.10.4