Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 5
0
def check_scales():
    print("Checking Scales...")
    for brand, drivers in get_supported_scales().items():
        _check_drivers(IScale, brand, drivers)
Exemplo n.º 6
0
def check_scales():
    print("Checking Scales...")
    for brand, drivers in get_supported_scales().items():
        _check_drivers(IScale, brand, drivers)