def get_description(self): # Quick workaround to avoid calling FiscalPrinter.setup(), since that # may send commands to the ECF, and we just need the description. # TODO: Improve stoqdrivers so we can get this easyer port = VirtualPort() driver = BasePrinter(brand=self.brand, model=self.model, port=port) return driver.get_model_name()
def __init__(self, brand=None, model=None, device=None, config_file=None, *args, **kwargs): BasePrinter.__init__(self, brand, model, device, config_file, *args, **kwargs) if not IChequePrinter in providedBy(self._driver): raise DoesNotImplement("The driver %r doesn't implements the " "IChequePrinter interface" % self._driver) self._charset = self._driver.cheque_printer_charset
def __init__(self, brand=None, model=None, device=None, config_file=None, *args, **kwargs): BasePrinter.__init__(self, brand, model, device, config_file, *args, **kwargs)
def __init__(self, brand=None, model=None, device=None, config_file=None, *args, **kwargs): BasePrinter.__init__(self, brand, model, device, config_file, *args, **kwargs) self._has_been_totalized = False self.payments_total_value = Decimal("0.0") self.totalized_value = Decimal("0.0") self._capabilities = self._driver.get_capabilities() self._charset = self._driver.coupon_printer_charset self.setup()
def __init__(self, brand=None, model=None, device=None, config_file=None, *args, **kwargs): BasePrinter.__init__(self, brand, model, device, config_file, *args, **kwargs) self._has_been_totalized = False self.payments_total_value = Decimal("0.0") self.totalized_value = Decimal("0.0") self._capabilities = self._driver.get_capabilities() self._charset = self._driver.coupon_printer_charset try: self.setup() self._setup_complete = True except Exception: log.error(''.join(traceback.format_exception(*sys.exc_info()))) self._setup_complete = False