diff --git a/InvenTree/plugins/integration.py b/InvenTree/plugins/integration.py index 76a5add70c..2177a4f610 100644 --- a/InvenTree/plugins/integration.py +++ b/InvenTree/plugins/integration.py @@ -257,6 +257,7 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin): PLUGIN_SLUG = None AUTHOR = None + PUBLISH_DATE = None def __init__(self): super().__init__() @@ -293,6 +294,16 @@ class IntegrationPluginBase(MixinBase, plugin.InvenTreePlugin): name = _('No author found') return name + @property + def pub_date(self): + """returns publishing date of plugin - either from plugin settings or git""" + name = getattr(self, 'PUBLISH_DATE', None) + if not name: + name = self.commit.get('date') + if not name: + name = _('No date found') + 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 2a14cb7fa0..c3109dda3c 100644 --- a/InvenTree/templates/InvenTree/settings/plugin.html +++ b/InvenTree/templates/InvenTree/settings/plugin.html @@ -47,7 +47,7 @@ {% endif %}