Пример #1
0
 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
Пример #2
0
 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
Пример #3
0
 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
Пример #4
0
 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
Пример #5
0
def check_scales():
    print("Checking Scales...")
    for brand, drivers in get_supported_scales().items():
        _check_drivers(IScale, brand, drivers)
Пример #6
0
def check_scales():
    print("Checking Scales...")
    for brand, drivers in get_supported_scales().items():
        _check_drivers(IScale, brand, drivers)