2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-20 13:56:30 +00:00

Further barcode work

- Simplify InvenTree barcode format
- Create base-clas for plugin
This commit is contained in:
Oliver Walters
2020-04-14 21:30:43 +10:00
parent 70589b06e1
commit 4a615e05ae
9 changed files with 127 additions and 49 deletions

View File

@ -478,11 +478,11 @@ class Part(models.Model):
""" Return a JSON string for formatting a barcode for this Part object """
return helpers.MakeBarcode(
"Part",
self.id,
reverse('api-part-detail', kwargs={'pk': self.id}),
"part",
{
'name': self.name,
"id": self.id,
"name": self.full_name,
"url": reverse('api-part-detail', kwargs={'pk': self.id}),
}
)