diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index 3e8e400729..334f285e2c 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -73,6 +73,7 @@ settings_urls = [ url(r'^user/?', SettingsView.as_view(template_name='InvenTree/settings/user.html'), name='settings-user'), url(r'^theme/?', ColorThemeSelectView.as_view(), name='settings-theme'), + url(r'^global/?', SettingsView.as_view(template_name='InvenTree/settings/global.html'), name='settings-global'), url(r'^currency/?', SettingsView.as_view(template_name='InvenTree/settings/currency.html'), name='settings-currency'), url(r'^part/?', SettingsView.as_view(template_name='InvenTree/settings/part.html'), name='settings-part'), url(r'^stock/?', SettingsView.as_view(template_name='InvenTree/settings/stock.html'), name='settings-stock'), diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index ef6ebce8bf..76320edd98 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -51,6 +51,12 @@ class InvenTreeSetting(models.Model): 'description': _('String descriptor for the server instance'), }, + 'INVENTREE_COMPANY_NAME': { + 'name': _('Company name'), + 'description': _('Internal company name'), + 'default': 'My company name', + }, + 'PART_IPN_REGEX': { 'name': _('IPN Regex'), 'description': _('Regular expression pattern for matching Part IPN') diff --git a/InvenTree/templates/InvenTree/settings/global.html b/InvenTree/templates/InvenTree/settings/global.html new file mode 100644 index 0000000000..7dcdd54bea --- /dev/null +++ b/InvenTree/templates/InvenTree/settings/global.html @@ -0,0 +1,23 @@ +{% extends "InvenTree/settings/settings.html" %} +{% load i18n %} +{% load inventree_extras %} + +{% block tabs %} +{% include "InvenTree/settings/tabs.html" with tab='global' %} +{% endblock %} + +{% block subtitle %} +{% trans "Global InvenTree Settings" %} +{% endblock %} + +{% block settings %} + +