diff --git a/addons/hw_drivers/controllers/driver.py b/addons/hw_drivers/controllers/driver.py
index bde5f5b1756..aca0a3cb4f1 100755
--- a/addons/hw_drivers/controllers/driver.py
+++ b/addons/hw_drivers/controllers/driver.py
@@ -427,7 +427,6 @@ class Manager(Thread):
while 1:
updated_devices = self.usb_loop()
updated_devices.update(self.video_loop())
- updated_devices.update(mpdm.devices)
updated_devices.update(display_devices)
updated_devices.update(bt_devices)
updated_devices.update(socket_devices)
@@ -494,42 +493,11 @@ class SocketManager(Thread):
except OSError as e:
_logger.error(_('Error in SocketManager: %s') % (e.strerror))
-class MPDManager(Thread):
- def __init__(self):
- super(MPDManager, self).__init__()
- self.devices = {}
- self.mpd_session = ctypes.c_void_p()
-
- def run(self):
- eftapi.EFT_CreateSession(ctypes.byref(self.mpd_session))
- while True:
- if self.terminal_connected(terminal_id):
- self.devices[terminal_id] = IoTDevice(terminal_id, 'mpd')
- elif terminal_id in self.devices:
- self.devices = {}
- time.sleep(20)
-
- def terminal_connected(self, terminal_id):
- eftapi.EFT_QueryStatus(self.mpd_session)
- device_status = ctypes.c_long()
- eftapi.EFT_GetDeviceStatusCode(self.mpd_session, ctypes.byref(device_status))
- return device_status.value in [0, 1]
-
-
conn = cups_connection()
PPDs = conn.getPPDs()
printers = conn.getPrinters()
cups_lock = Lock() # We can only make one call to Cups at a time
-mpdm = MPDManager()
-terminal_id = helpers.read_file_first_line('odoo-six-payment-terminal.conf')
-subprocess.call(["pkill", "-9", "eftdvs"]) # Kill any running MPD server
-if terminal_id:
- subprocess.Popen(["eftdvs", "/ConfigDir", "/usr/share/eftdvs/", "/TID", terminal_id]) # Start MPD server
- eftapi = ctypes.CDLL("eftapi.so") # Library given by Six
- mpdm.daemon = True
- mpdm.start()
-
m = Manager()
m.daemon = True
m.start()
diff --git a/addons/hw_posbox_homepage/controllers/main.py b/addons/hw_posbox_homepage/controllers/main.py
index c556dc8e83d..37030cabac5 100644
--- a/addons/hw_posbox_homepage/controllers/main.py
+++ b/addons/hw_posbox_homepage/controllers/main.py
@@ -46,7 +46,6 @@ wifi_config_template = jinja_env.get_template('wifi_config.html')
driver_list_template = jinja_env.get_template('driver_list.html')
remote_connect_template = jinja_env.get_template('remote_connect.html')
configure_wizard_template = jinja_env.get_template('configure_wizard.html')
-six_payment_terminal_template = jinja_env.get_template('six_payment_terminal.html')
list_credential_template = jinja_env.get_template('list_credential.html')
upgrade_page_template = jinja_env.get_template('upgrade_page.html')
@@ -58,10 +57,6 @@ class IoTboxHomepage(web.Home):
def clean_partition(self):
subprocess.check_call(['sudo', 'bash', '-c', '. /home/pi/odoo/addons/point_of_sale/tools/posbox/configuration/upgrade.sh; cleanup'])
- def get_six_terminal(self):
- terminal_id = helpers.read_file_first_line('odoo-six-payment-terminal.conf')
- return terminal_id or 'Not Configured'
-
def get_homepage_data(self):
hostname = str(socket.gethostname())
mac = get_mac()
@@ -92,7 +87,6 @@ class IoTboxHomepage(web.Home):
'mac': ":".join(i + next(h) for i in h),
'iot_device_status': iot_device,
'server_status': helpers.get_odoo_server_url() or 'Not Configured',
- 'six_terminal': self.get_six_terminal(),
'network_status': network,
'version': helpers.get_version(),
}
@@ -270,26 +264,6 @@ class IoTboxHomepage(web.Home):
else:
return 'already running'
- @http.route('/six_payment_terminal', type='http', auth='none', cors='*', csrf=False)
- def six_payment_terminal(self):
- return six_payment_terminal_template.render({
- 'title': 'Six Payment Terminal',
- 'breadcrumb': 'Six Payment Terminal',
- 'terminalId': self.get_six_terminal(),
- })
-
- @http.route('/six_payment_terminal_add', type='http', auth='none', cors='*', csrf=False)
- def add_six_payment_terminal(self, terminal_id):
- helpers.write_file('odoo-six-payment-terminal.conf', terminal_id)
- subprocess.check_call(["sudo", "service", "odoo", "restart"])
- return 'http://' + helpers.get_ip() + ':8069'
-
- @http.route('/six_payment_terminal_clear', type='http', auth='none', cors='*', csrf=False)
- def clear_six_payment_terminal(self):
- helpers.unlink_file('odoo-six-payment-terminal.conf')
- subprocess.check_call(["sudo", "service", "odoo", "restart"])
- return ""
-
@http.route('/hw_proxy/upgrade', type='http', auth='none', )
def upgrade(self):
commit = subprocess.check_output(["git", "--work-tree=/home/pi/odoo/", "--git-dir=/home/pi/odoo/.git", "log", "-1"]).decode('utf-8').replace("\n", "
")
diff --git a/addons/hw_posbox_homepage/views/homepage.html b/addons/hw_posbox_homepage/views/homepage.html
index ea469596efe..05af84bc7c0 100644
--- a/addons/hw_posbox_homepage/views/homepage.html
+++ b/addons/hw_posbox_homepage/views/homepage.html
@@ -110,12 +110,6 @@
- Set the Terminal ID (TID) of the terminal you want to use. -
- - {% if terminalId %} -- Current Terminal Id: {{ terminalId }} -
-