mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 03:00:54 +00:00
Fixes for barcode data rendering
This commit is contained in:
@ -45,16 +45,17 @@ class StockLocation(InvenTreeTree):
|
||||
def get_absolute_url(self):
|
||||
return reverse('stock-location-detail', kwargs={'pk': self.id})
|
||||
|
||||
def format_barcode(self):
|
||||
def format_barcode(self, **kwargs):
|
||||
""" Return a JSON string for formatting a barcode for this StockLocation object """
|
||||
|
||||
return helpers.MakeBarcode(
|
||||
'stocklocation',
|
||||
self.pk,
|
||||
{
|
||||
"id": self.id,
|
||||
"name": self.name,
|
||||
"url": reverse('api-location-detail', kwargs={'pk': self.id}),
|
||||
}
|
||||
},
|
||||
**kwargs
|
||||
)
|
||||
|
||||
def get_stock_items(self, cascade=True):
|
||||
@ -298,7 +299,6 @@ class StockItem(MPTTModel):
|
||||
"stockitem",
|
||||
self.id,
|
||||
{
|
||||
"id": self.id,
|
||||
"url": reverse('api-stock-detail', kwargs={'pk': self.id}),
|
||||
},
|
||||
**kwargs
|
||||
|
Reference in New Issue
Block a user