diff --git a/InvenTree/plugin/__init__.py b/InvenTree/plugin/__init__.py index 3b2f9fe871..ae38ae6e5b 100644 --- a/InvenTree/plugin/__init__.py +++ b/InvenTree/plugin/__init__.py @@ -3,13 +3,14 @@ Utility file to enable simper imports """ from .registry import registry -from .plugin import InvenTreePlugin +from .plugin import InvenTreePlugin, IntegrationPluginBase from .helpers import MixinNotImplementedError, MixinImplementationError __all__ = [ 'registry', 'InvenTreePlugin', + IntegrationPluginBase, 'MixinNotImplementedError', 'MixinImplementationError', ] diff --git a/InvenTree/plugin/plugin.py b/InvenTree/plugin/plugin.py index 45acb55e65..86c9f07936 100644 --- a/InvenTree/plugin/plugin.py +++ b/InvenTree/plugin/plugin.py @@ -7,6 +7,7 @@ import os import inspect from datetime import datetime import pathlib +import warnings from django.conf import settings from django.db.utils import OperationalError, ProgrammingError @@ -336,3 +337,11 @@ class InvenTreePlugin(MixinBase, InvenTreePluginBase): self.package = package self.sign_state = sign_state # endregion + + +class IntegrationPluginBase(InvenTreePlugin): + def __init__(self, *args, **kwargs): + """Send warning about using this reference""" + # TODO remove in 0.8.0 + warnings.warn("This import is deprecated - use InvenTreePlugin", DeprecationWarning) + super().__init__(*args, **kwargs)