Implemented the incremental search (search-as-you-type) in the base account selector of the account form.

This commit is contained in:
2023-02-07 20:18:57 +08:00
parent d9585f0e53
commit 4b5b348270
3 changed files with 59 additions and 2 deletions

View File

@ -64,6 +64,14 @@ class BaseAccount(db.Model):
return l10n.title
return self.title_l10n
@property
def query_values(self) -> list[str]:
"""Returns the values to be queried.
:return: The values to be queried.
"""
return [self.code, self.title_l10n] + [x.title for x in self.l10n]
class BaseAccountL10n(db.Model):
"""A localized base account title."""