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

Merge pull request #896 from SchrodingersGat/company-ordering

Add default ordering for Company model
This commit is contained in:
Oliver
2020-08-08 17:21:21 +10:00
committed by GitHub
4 changed files with 41 additions and 3 deletions

View File

@ -0,0 +1,17 @@
# Generated by Django 3.0.7 on 2020-08-08 07:15
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('company', '0022_auto_20200613_1045'),
]
operations = [
migrations.AlterModelOptions(
name='company',
options={'ordering': ['name']},
),
]

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'))