2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-09 15:10:54 +00:00

Stock API now hyperlinkd

This commit is contained in:
Oliver Walters
2017-04-14 23:44:24 +10:00
parent 9e3fa00fdd
commit 7c5261bc4a
4 changed files with 14 additions and 10 deletions

View File

@ -31,6 +31,9 @@ class SupplierPart(models.Model):
- A Part may be available from multiple suppliers
"""
class Meta:
unique_together = ('part', 'supplier', 'SKU')
part = models.ForeignKey(Part, null=True, blank=True, on_delete=models.CASCADE)
supplier = models.ForeignKey(Supplier, on_delete=models.CASCADE)
SKU = models.CharField(max_length=100)