mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-15 03:25:42 +00:00
Better string formatting for models
Allows for easier searching in drop-downs for ForeignKeys
This commit is contained in:
@ -53,7 +53,7 @@ class Company(models.Model):
|
||||
is_supplier = models.BooleanField(default=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
return "{n} - {d}".format(n=self.name, d=self.description)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return "/company/{id}/".format(id=self.id)
|
||||
|
Reference in New Issue
Block a user