Ejemplo n.º 1
0
    def _needs_cat52(self, printer):
        # If the param is not enabled, we dont need.
        if not sysparam.get_bool('ENABLE_DOCUMENT_ON_INVOICE'):
            return False

        # Even if the parameter is enabled, we can only generate cat52 for
        # the printer we support, and that dont have MFD:
        # If the printer has an MFD, it should not be present in the
        # MODEL_CODES variable
        model = MODEL_CODES.get((printer.brand, printer.model))
        if not model:
            return False

        return True
Ejemplo n.º 2
0
    def _needs_cat52(self, printer):
        # If the param is not enabled, we dont need.
        if not sysparam.get_bool("ENABLE_DOCUMENT_ON_INVOICE"):
            return False

        # Even if the parameter is enabled, we can only generate cat52 for
        # the printer we support, and that dont have MFD:
        # If the printer has an MFD, it should not be present in the
        # MODEL_CODES variable
        model = MODEL_CODES.get((printer.brand, printer.model))
        if not model:
            return False

        return True