diff --git a/addons/hw_escpos/controllers/main.py b/addons/hw_escpos/controllers/main.py index c57238bd659..2ec0036af8d 100644 --- a/addons/hw_escpos/controllers/main.py +++ b/addons/hw_escpos/controllers/main.py @@ -146,7 +146,7 @@ class EscposDriver(Thread): _logger.warning('ESC/POS Device Disconnected: '+message) def run(self): - + printer = None if not escpos: _logger.error('ESC/POS cannot initialize, please verify system dependencies.') return @@ -192,7 +192,7 @@ class EscposDriver(Thread): errmsg = str(e) + '\n' + '-'*60+'\n' + traceback.format_exc() + '-'*60 + '\n' _logger.error(errmsg); finally: - if error: + if error: self.queue.put((timestamp, task, data)) if printer: printer.close() diff --git a/addons/hw_posbox_homepage/controllers/main.py b/addons/hw_posbox_homepage/controllers/main.py index 25e33c409fa..ad98b1f46a2 100644 --- a/addons/hw_posbox_homepage/controllers/main.py +++ b/addons/hw_posbox_homepage/controllers/main.py @@ -43,7 +43,7 @@ index_template = """ to the hardware status page
- The PosBox software installed on this posbox is version 6, + The PosBox software installed on this posbox is version 8, the posbox version number is independent from Odoo. You can upgrade the software on the upgrade page
diff --git a/addons/hw_posbox_upgrade/controllers/main.py b/addons/hw_posbox_upgrade/controllers/main.py index 0947fbc8564..52df1e8e245 100644 --- a/addons/hw_posbox_upgrade/controllers/main.py +++ b/addons/hw_posbox_upgrade/controllers/main.py @@ -73,9 +73,11 @@ upgrade_template = """- This tool will help you perform an upgrade of the PosBox's software. + This tool will help you perform an upgrade of the PosBox's software over the + internet. +
However the preferred method to upgrade the posbox is to flash the sd-card with - the latest image. The upgrade + the latest image. The upgrade procedure is explained into to the PosBox manual@@ -106,7 +108,7 @@ class PosboxUpgrader(hw_proxy.Proxy): self.upgrading.release() return 'UPTODATE' else: - os.system('/bin/bash /home/pi/openerp/update.sh') + os.system('/bin/bash /home/pi/odoo/posbox/update.sh') self.last_upgrade = time.time() self.upgrading.release() return 'SUCCESS' @@ -118,7 +120,7 @@ class PosboxUpgrader(hw_proxy.Proxy): self.upgrading.release() return 'RESTARTED' else: - os.system('/bin/bash /home/pi/openerp/restart.sh') + os.system('/bin/bash /home/pi/odoo/posbox/restart.sh') self.last_upgrade = time.time() self.upgrading.release() return 'SUCCESS' diff --git a/addons/hw_proxy/controllers/main.py b/addons/hw_proxy/controllers/main.py index eced1d65b94..677bff1354e 100644 --- a/addons/hw_proxy/controllers/main.py +++ b/addons/hw_proxy/controllers/main.py @@ -17,6 +17,14 @@ _logger = logging.getLogger(__name__) from openerp import http from openerp.http import request +# Those are the builtin raspberry pi USB modules, they should +# not appear in the list of connected devices. +BANNED_DEVICES = set([ + "0424:9514", # Standard Microsystem Corp. Builtin Ethernet module + "1d6b:0002", # Linux Foundation 2.0 root hub + "0424:ec00", # Standard Microsystem Corp. Other Builtin Ethernet module +]) + # drivers modules must add to drivers an object with a get_status() method # so that 'status' can return the status of all active drivers @@ -88,10 +96,18 @@ class Proxy(http.Controller):
The list of connected USB devices as seen by the posbox
""" devices = commands.getoutput("lsusb").split('\n') + count = 0 resp += "