mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-20 22:06:28 +00:00
Merge pull request #906 from SchrodingersGat/blabel
Label Printing Functionality
This commit is contained in:
@ -560,16 +560,17 @@ class Part(MPTTModel):
|
||||
|
||||
responsible = models.ForeignKey(User, on_delete=models.SET_NULL, blank=True, null=True, related_name='parts_responible')
|
||||
|
||||
def format_barcode(self):
|
||||
def format_barcode(self, **kwargs):
|
||||
""" Return a JSON string for formatting a barcode for this Part object """
|
||||
|
||||
return helpers.MakeBarcode(
|
||||
"part",
|
||||
self.id,
|
||||
{
|
||||
"id": self.id,
|
||||
"name": self.full_name,
|
||||
"url": reverse('api-part-detail', kwargs={'pk': self.id}),
|
||||
}
|
||||
},
|
||||
**kwargs
|
||||
)
|
||||
|
||||
@property
|
||||
|
Reference in New Issue
Block a user