mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 19:15:41 +00:00
Merge remote-tracking branch 'inventree/master' into stock-expiry
# Conflicts: # InvenTree/common/models.py
This commit is contained in:
@ -110,7 +110,21 @@ class InvenTreeSetting(models.Model):
|
||||
'default': True,
|
||||
'validator': bool
|
||||
},
|
||||
|
||||
|
||||
'PART_TEMPLATE': {
|
||||
'name': _('Template'),
|
||||
'description': _('Parts are templates by default'),
|
||||
'default': False,
|
||||
'validator': bool,
|
||||
},
|
||||
|
||||
'PART_ASSEMBLY': {
|
||||
'name': _('Assembly'),
|
||||
'description': _('Parts can be assembled from other components by default'),
|
||||
'default': False,
|
||||
'validator': bool,
|
||||
},
|
||||
|
||||
'PART_COMPONENT': {
|
||||
'name': _('Component'),
|
||||
'description': _('Parts can be used as sub-components by default'),
|
||||
@ -139,6 +153,9 @@ class InvenTreeSetting(models.Model):
|
||||
'validator': bool,
|
||||
},
|
||||
|
||||
'PART_VIRTUAL': {
|
||||
'name': _('Virtual'),
|
||||
'description': _('Parts are virtual by default'),
|
||||
'STOCK_ALLOW_EXPIRED_SALE': {
|
||||
'name': _('Sell Expired Stock'),
|
||||
'description': _('Allow sale of expired stock'),
|
||||
|
@ -31,7 +31,7 @@ class SettingsTest(TestCase):
|
||||
# There should be two settings objects in the database
|
||||
settings = InvenTreeSetting.objects.all()
|
||||
|
||||
self.assertEqual(settings.count(), 2)
|
||||
self.assertTrue(settings.count() >= 2)
|
||||
|
||||
instance_name = InvenTreeSetting.objects.get(pk=1)
|
||||
self.assertEqual(instance_name.key, 'INVENTREE_INSTANCE')
|
||||
|
Reference in New Issue
Block a user