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

Add form for setting part category

This commit is contained in:
Oliver Walters
2019-09-17 14:06:11 +10:00
parent 94cd28ecb9
commit 08f958dd72
3 changed files with 40 additions and 48 deletions

View File

@@ -7,6 +7,7 @@ from __future__ import unicode_literals
from InvenTree.forms import HelperForm
from mptt.fields import TreeNodeChoiceField
from django import forms
from django.utils.translation import ugettext as _
@@ -66,6 +67,12 @@ class EditPartAttachmentForm(HelperForm):
]
class SetPartCategoryForm(forms.Form):
""" Form for setting the category of multiple Part objects """
part_category = TreeNodeChoiceField(queryset=PartCategory.objects.all(), required=True, help_text=_('Select part category'))
class EditPartForm(HelperForm):
""" Form for editing a Part object """