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

Added barcode for Part object

This commit is contained in:
Oliver Walters
2019-05-02 20:57:53 +10:00
parent c901294a48
commit 5a234a1070
4 changed files with 18 additions and 3 deletions

View File

@ -42,9 +42,9 @@ class StockLocation(InvenTreeTree):
return helpers.MakeBarcode(
'StockLocation',
self.id,
reverse('api-location-detail', kwargs={'pk': self.id}),
{
'id': self.id,
'name': self.name,
}
)
@ -153,9 +153,9 @@ class StockItem(models.Model):
return helpers.MakeBarcode(
'StockItem',
self.id,
reverse('api-stock-detail', kwargs={'pk': self.id}),
{
'id': self.id,
'part_id': self.part.id,
'part_name': self.part.name
}