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:
@@ -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',
|
||||
]
|
||||
|
Reference in New Issue
Block a user