diff --git a/InvenTree/stock/forms.py b/InvenTree/stock/forms.py index edf3d28df8..ddd7390246 100644 --- a/InvenTree/stock/forms.py +++ b/InvenTree/stock/forms.py @@ -63,6 +63,18 @@ class EditStockLocationForm(HelperForm): ] +class ConvertStockItemForm(HelperForm): + """ + Form for converting a StockItem to a variant of its current part. + """ + + class Meta: + model = StockItem + fields = [ + 'part' + ] + + class CreateStockItemForm(HelperForm): """ Form for creating a new StockItem """ diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html index 819c138988..bc187588d0 100644 --- a/InvenTree/stock/templates/stock/item_base.html +++ b/InvenTree/stock/templates/stock/item_base.html @@ -93,6 +93,11 @@ InvenTree | {% trans "Stock Item" %} - {{ item }} {% endif %} + {% if item.part.has_variants %} + + {% endif %} {% if item.part.has_test_report_templates %}