From e7237d13ae2f6743b9870cfec6ba568fc4dc7960 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 4 Oct 2021 22:10:31 +0200 Subject: [PATCH] added version identifier --- InvenTree/plugins/integration.py | 7 +++++++ InvenTree/templates/InvenTree/settings/plugin.html | 2 ++ 2 files changed, 9 insertions(+) diff --git a/InvenTree/plugins/integration.py b/InvenTree/plugins/integration.py index 2177a4f610..bf604ea391 100644 --- a/InvenTree/plugins/integration.py +++ b/InvenTree/plugins/integration.py @@ -258,6 +258,7 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin): AUTHOR = None PUBLISH_DATE = None + VERSION = None def __init__(self): super().__init__() @@ -304,6 +305,12 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin): name = _('No date found') return name + @property + def version(self): + """returns version of plugin""" + name = getattr(self, 'VERSION', None) + return name + # mixins def mixin(self, key): """check if mixin is registered""" diff --git a/InvenTree/templates/InvenTree/settings/plugin.html b/InvenTree/templates/InvenTree/settings/plugin.html index c3109dda3c..92ae800dac 100644 --- a/InvenTree/templates/InvenTree/settings/plugin.html +++ b/InvenTree/templates/InvenTree/settings/plugin.html @@ -20,6 +20,7 @@ {% trans "Name" %} {% trans "Author" %} {% trans "Date" %} + {% trans "Version" %} @@ -48,6 +49,7 @@ {{ plugin.author }} {{ plugin.pub_date }} + {{ plugin.version }} {% endfor %}