Fixed the search query to prevent duplicated result from localized content in the accounting application.
This commit is contained in:
parent
a478f185c8
commit
9c5b0d59c4
@ -769,9 +769,10 @@ def search(request: HttpRequest) -> HttpResponse:
|
|||||||
records = []
|
records = []
|
||||||
else:
|
else:
|
||||||
records = Record.objects.filter(
|
records = Record.objects.filter(
|
||||||
Q(account__title_l10n__icontains=query)
|
Q(account__in=Account.objects.filter(
|
||||||
| Q(account__l10n_set__value__icontains=query)
|
Q(title_l10n__icontains=query)
|
||||||
| Q(account__code__icontains=query)
|
| Q(l10n_set__value__icontains=query)
|
||||||
|
| Q(code__icontains=query)))
|
||||||
| Q(summary__icontains=query)
|
| Q(summary__icontains=query)
|
||||||
| Q(transaction__notes__icontains=query))
|
| Q(transaction__notes__icontains=query))
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user