Add purchase types

This commit is contained in:
2023-11-14 19:27:00 +01:00
parent c8a3212b77
commit ae079e36ec
13 changed files with 241 additions and 11 deletions

View File

@ -55,6 +55,9 @@ class PurchaseForm(forms.ModelForm):
widget=IncludePlatformSelect(attrs={"autoselect": "autoselect"}),
)
platform = forms.ModelChoiceField(queryset=Platform.objects.order_by("name"))
related_purchase = forms.ModelChoiceField(
queryset=Purchase.objects.order_by("edition__sort_name")
)
class Meta:
widgets = {
@ -72,6 +75,9 @@ class PurchaseForm(forms.ModelForm):
"price",
"price_currency",
"ownership_type",
"type",
"related_purchase",
"name",
]