Exemplo n.º 1
0
def load_barcode_plugins(debug=False):
    """
    Function to load all barcode plugins
    """

    logger.debug("Loading barcode plugins")

    plugins = InvenTreePlugins.get_plugins(BarcodePlugins, BarcodePlugin)

    if debug:
        if len(plugins) > 0:
            logger.info(f"Discovered {len(plugins)} barcode plugins")

            for p in plugins:
                logger.debug(" - {p}".format(p=p.PLUGIN_NAME))
        else:
            logger.debug("No barcode plugins found")

    return plugins
Exemplo n.º 2
0
def load_barcode_plugins(debug=False):
    """
    Function to load all barcode plugins
    """

    if debug:
        print("Loading barcode plugins")

    plugins = InvenTreePlugins.get_plugins(BarcodePlugins, BarcodePlugin)

    if debug:
        if len(plugins) > 0:
            print("Discovered {n} plugins:".format(n=len(plugins)))

            for p in plugins:
                print(" - {p}".format(p=p.PLUGIN_NAME))
        else:
            print("No barcode plugins found")

    return plugins