2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-08 12:50:55 +00:00

Finally got migrations working together

This commit is contained in:
Oliver
2018-04-22 21:54:12 +10:00
parent cef3c664f9
commit 4bedf0ed4c
86 changed files with 356 additions and 2279 deletions

View File

@@ -3,6 +3,7 @@ from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from .models import Part, PartCategory, BomItem
from .models import SupplierPart
class EditPartForm(forms.ModelForm):
@@ -73,3 +74,27 @@ class EditBomItemForm(forms.ModelForm):
'sub_part',
'quantity'
]
class EditSupplierPartForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(EditSupplierPartForm, self).__init__(*args, **kwargs)
self.helper = FormHelper()
self.helper.form_id = 'id-edit-part-form'
self.helper.form_class = 'blueForms'
self.helper.form_method = 'post'
self.helper.add_input(Submit('submit', 'Submit'))
class Meta:
model = SupplierPart
fields = [
'supplier',
'SKU',
'part',
'description',
'URL',
'manufacturer',
'MPN',
]