mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 13:06:45 +00:00
PEP fixes
This commit is contained in:
parent
f4ef9d938e
commit
09cb067627
@ -5,15 +5,18 @@ from django.db import models
|
|||||||
from InvenTree.models import Company
|
from InvenTree.models import Company
|
||||||
from part.models import Part
|
from part.models import Part
|
||||||
|
|
||||||
|
|
||||||
class Supplier(Company):
|
class Supplier(Company):
|
||||||
""" Represents a manufacturer or supplier
|
""" Represents a manufacturer or supplier
|
||||||
"""
|
"""
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Customer(Company):
|
class Customer(Company):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class SupplierPart(models.Model):
|
class SupplierPart(models.Model):
|
||||||
""" Represents a unique part as provided by a Supplier
|
""" Represents a unique part as provided by a Supplier
|
||||||
Each SupplierPart is identified by a MPN (Manufacturer Part Number)
|
Each SupplierPart is identified by a MPN (Manufacturer Part Number)
|
||||||
@ -52,7 +55,7 @@ class SupplierPriceBreak(models.Model):
|
|||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "{mpn} - {cost}{currency} @ {quan}".format(
|
return "{mpn} - {cost}{currency} @ {quan}".format(
|
||||||
mpn = part.MPN,
|
mpn=part.MPN,
|
||||||
cost = self.cost,
|
cost=self.cost,
|
||||||
currency = self.currency if self.currency else '',
|
currency=self.currency if self.currency else '',
|
||||||
quan = self.quantity)
|
quan=self.quantity)
|
@ -6,6 +6,7 @@ from django.contrib.auth.models import User
|
|||||||
from supplier.models import Customer
|
from supplier.models import Customer
|
||||||
from part.models import Part, PartRevision
|
from part.models import Part, PartRevision
|
||||||
|
|
||||||
|
|
||||||
class UniquePart(models.Model):
|
class UniquePart(models.Model):
|
||||||
""" A unique instance of a Part object.
|
""" A unique instance of a Part object.
|
||||||
Used for tracking parts based on serial numbers,
|
Used for tracking parts based on serial numbers,
|
||||||
@ -48,6 +49,7 @@ class UniquePart(models.Model):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.part.name
|
return self.part.name
|
||||||
|
|
||||||
|
|
||||||
class PartTrackingInfo(models.Model):
|
class PartTrackingInfo(models.Model):
|
||||||
""" Single data-point in the life of a UniquePart
|
""" Single data-point in the life of a UniquePart
|
||||||
Each time something happens to the UniquePart,
|
Each time something happens to the UniquePart,
|
||||||
@ -58,5 +60,3 @@ class PartTrackingInfo(models.Model):
|
|||||||
date = models.DateField(auto_now_add=True,
|
date = models.DateField(auto_now_add=True,
|
||||||
editable=False)
|
editable=False)
|
||||||
notes = models.CharField(max_length=500)
|
notes = models.CharField(max_length=500)
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user