SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 1914f74a authored by George Katsikas's avatar George Katsikas :goat:
Browse files

change subsidy payment appearance in orphaned list

parent 8f300781
No related branches found
No related tags found
No related merge requests found
......@@ -299,6 +299,11 @@ class SubsidyPaymentForm(forms.ModelForm):
return instance
class SubsidyPaymentAmountDateChoiceField(forms.ModelChoiceField):
def label_from_instance(self, obj: SubsidyPayment):
return f"{obj.status}{obj.amount} on {obj.date_scheduled}"
class SubsidyAttachmentInlineLinkForm(forms.ModelForm):
class Meta:
model = SubsidyAttachment
......@@ -313,7 +318,7 @@ class SubsidyAttachmentInlineLinkForm(forms.ModelForm):
required=False,
)
subsidy_payment = forms.ModelChoiceField(
subsidy_payment = SubsidyPaymentAmountDateChoiceField(
queryset=SubsidyPayment.objects.none(),
widget=forms.RadioSelect(),
required=False,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment