[IMP] posbox: print the homepage url on the status ticket

bzr revid: fva@openerp.com-20140321163740-0o0b3ikmz6jv6cwr
This commit is contained in:
Frédéric van der Essen 2014-03-21 17:37:40 +01:00
parent 88e9f7e90b
commit 6aa0187ca3
1 changed files with 7 additions and 2 deletions

View File

@ -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):