mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP fixes
This commit is contained in:
parent
c82d5482aa
commit
e199ed2281
@ -71,7 +71,6 @@ class Build(models.Model):
|
||||
help_text='Number of parts to build'
|
||||
)
|
||||
|
||||
|
||||
status = models.PositiveIntegerField(default=BuildStatus.PENDING,
|
||||
choices=BuildStatus.items(),
|
||||
validators=[MinValueValidator(0)],
|
||||
|
@ -150,7 +150,6 @@ class Company(models.Model):
|
||||
])
|
||||
|
||||
|
||||
|
||||
class Contact(models.Model):
|
||||
""" A Contact represents a person who works at a particular company.
|
||||
A Company may have zero or more associated Contact objects.
|
||||
|
@ -2,7 +2,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.contrib import admin
|
||||
from import_export.admin import ImportExportModelAdmin
|
||||
|
||||
from .models import PurchaseOrder, PurchaseOrderLineItem
|
||||
|
||||
|
@ -1,12 +1,10 @@
|
||||
from django.db import models, transaction
|
||||
from django.db import models
|
||||
from django.core.validators import MinValueValidator
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from part.models import Part
|
||||
from company.models import Company
|
||||
from stock.models import StockItem
|
||||
|
||||
from InvenTree.status_codes import OrderStatus
|
||||
|
||||
@ -75,7 +73,8 @@ class PurchaseOrder(Order):
|
||||
|
||||
ORDER_PREFIX = "PO"
|
||||
|
||||
supplier = models.ForeignKey(Company, on_delete=models.CASCADE,
|
||||
supplier = models.ForeignKey(
|
||||
Company, on_delete=models.CASCADE,
|
||||
limit_choices_to={
|
||||
'is_supplier': True,
|
||||
},
|
||||
@ -83,6 +82,7 @@ class PurchaseOrder(Order):
|
||||
help_text=_('Company')
|
||||
)
|
||||
|
||||
|
||||
class OrderLineItem(models.Model):
|
||||
""" Abstract model for an order line item
|
||||
|
||||
|
@ -1,3 +1 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
# TODO - Implement tests for the order app
|
||||
|
Loading…
Reference in New Issue
Block a user