2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 21:15:41 +00:00

Add default ordering for Company model

- Now will sort by "name" in choice fields, etc
This commit is contained in:
Oliver Walters
2020-08-08 16:54:09 +10:00
parent eac53c836c
commit ad977d4d26
2 changed files with 7 additions and 3 deletions

View File

@ -79,6 +79,9 @@ class Company(models.Model):
is_manufacturer: boolean value, is this company a manufacturer
"""
class Meta:
ordering = ['name',]
name = models.CharField(max_length=100, blank=False, unique=True,
help_text=_('Company name'),
verbose_name=_('Company name'))