2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Merge branch 'inventree:master' into matmair/issue2385

This commit is contained in:
Matthias Mair
2022-04-27 17:46:57 +02:00
committed by GitHub
72 changed files with 38230 additions and 26790 deletions

View File

@ -771,7 +771,7 @@ class InvenTreeSetting(BaseInvenTreeSetting):
},
'INVENTREE_INSTANCE': {
'name': _('InvenTree Instance Name'),
'name': _('Server Instance Name'),
'default': 'InvenTree server',
'description': _('String descriptor for the server instance'),
},
@ -783,6 +783,13 @@ class InvenTreeSetting(BaseInvenTreeSetting):
'default': False,
},
'INVENTREE_RESTRICT_ABOUT': {
'name': _('Restrict showing `about`'),
'description': _('Show the `about` modal only to superusers'),
'validator': bool,
'default': False,
},
'INVENTREE_COMPANY_NAME': {
'name': _('Company name'),
'description': _('Internal company name'),
@ -1019,6 +1026,12 @@ class InvenTreeSetting(BaseInvenTreeSetting):
'validator': bool,
},
'STOCK_BATCH_CODE_TEMPLATE': {
'name': _('Batch Code Template'),
'description': _('Template for generating default batch codes for stock items'),
'default': '',
},
'STOCK_ENABLE_EXPIRY': {
'name': _('Stock Expiry'),
'description': _('Enable stock expiry functionality'),
@ -1426,7 +1439,7 @@ class InvenTreeUserSetting(BaseInvenTreeSetting):
'STICKY_HEADER': {
'name': _('Fixed Navbar'),
'description': _('InvenTree navbar position is fixed to the top of the screen'),
'description': _('The navbar position is fixed to the top of the screen'),
'default': False,
'validator': bool,
},

View File

@ -63,8 +63,8 @@ class SettingsTest(TestCase):
report_test_obj = InvenTreeSetting.get_setting_object('REPORT_ENABLE_TEST_REPORT')
# check settings base fields
self.assertEqual(instance_obj.name, 'InvenTree Instance Name')
self.assertEqual(instance_obj.get_setting_name(instance_ref), 'InvenTree Instance Name')
self.assertEqual(instance_obj.name, 'Server Instance Name')
self.assertEqual(instance_obj.get_setting_name(instance_ref), 'Server Instance Name')
self.assertEqual(instance_obj.description, 'String descriptor for the server instance')
self.assertEqual(instance_obj.get_setting_description(instance_ref), 'String descriptor for the server instance')