Assign free spools directly from the spool inventory

This commit is contained in:
Mikei386 committed 2026-11-14 19:26:13 +01:00
1 parent cd04de8b76
commit 196b7ff660
6 files changed
+90 -1

No files matched your search

+12
View File
@@ -158,6 +158,18 @@ class MountRefillForm(forms.Form):
self.fields["spool"].queryset = EmptySpool.objects.filter(owner=owner)
class AssignEmptySpoolForm(forms.Form):
item = forms.ModelChoiceField(
label="Filament ohne Spule",
queryset=InventoryItem.objects.none(),
empty_label="Filament auswählen",
)
def __init__(self, *args, items, **kwargs):
super().__init__(*args, **kwargs)
self.fields["item"].queryset = items
class ArticleLookupForm(forms.Form):
use_required_attribute = False