Order search: Further query-specific fine tuning

This commit is contained in:
Raphael Michel
2022-12-15 16:25:13 +01:00
parent 0cd8bbf9a9
commit bd5c9a4cb5
2 changed files with 16 additions and 11 deletions

View File

@@ -792,6 +792,12 @@ class OrderSearchFilterForm(OrderFilterForm):
)
)
def use_query_hack(self):
return (
self.cleaned_data.get('query') or
self.cleaned_data.get('status') in ('overpaid', 'partially_paid', 'underpaid', 'pendingpaid')
)
def filter_qs(self, qs):
fdata = self.cleaned_data
qs = super().filter_qs(qs)