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