def _get_supported_types(self): if self.model.type == DeviceSettings.SCALE_DEVICE: supported_types = get_supported_scales() elif self.model.type == DeviceSettings.CHEQUE_PRINTER_DEVICE: supported_types = get_supported_printers_by_iface(IChequePrinter) else: raise TypeError("The selected device type isn't supported") return supported_types
def _get_supported_types(self): if self.model.type == DeviceSettings.SCALE_DEVICE: supported_types = get_supported_scales() #elif self.model.type == DeviceSettings.CHEQUE_PRINTER_DEVICE: # supported_types = get_supported_printers_by_iface(IChequePrinter) elif self.model.type == DeviceSettings.NON_FISCAL_PRINTER_DEVICE: supported_types = get_supported_printers_by_iface(INonFiscalPrinter, include_virtual=is_developer_mode()) else: raise TypeError("The selected device type isn't supported") return supported_types
def check_scales(): print("Checking Scales...") for brand, drivers in get_supported_scales().items(): _check_drivers(IScale, brand, drivers)