mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-20 15:05:12 +00:00
Add a 'full_name' field for Part
- Combines IPN | Name | Variant - Use this to display in most views
This commit is contained in:
1 parent
08d743a735
commit
1d36ea3e2e
35 files changed
+81
-78
No files matched your search
@@ -180,7 +180,7 @@ class StockItem(models.Model):
|
||||
reverse('api-stock-detail', kwargs={'pk': self.id}),
|
||||
{
|
||||
'part_id': self.part.id,
|
||||
'part_name': self.part.name
|
||||
'part_name': self.part.full_name
|
||||
}
|
||||
)
|
||||
|
||||
@@ -464,7 +464,7 @@ class StockItem(models.Model):
|
||||
def __str__(self):
|
||||
s = '{n} x {part}'.format(
|
||||
n=self.quantity,
|
||||
part=self.part.name)
|
||||
part=self.part.full_name)
|
||||
|
||||
if self.location:
|
||||
s += ' @ {loc}'.format(loc=self.location.name)
|
||||
|
||||
Reference in new issue
Block a user