Added the is_nominal pseudo property to the Account data model.
This commit is contained in:
parent
5ceb9f2e83
commit
cabe02f7d0
@ -198,6 +198,14 @@ class Account(db.Model):
|
|||||||
return
|
return
|
||||||
self.l10n.append(AccountL10n(locale=current_locale, title=value))
|
self.l10n.append(AccountL10n(locale=current_locale, title=value))
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_nominal(self) -> bool:
|
||||||
|
"""Returns whether the account is a nominal account.
|
||||||
|
|
||||||
|
:return: True if the account is a nominal account, or False otherwise.
|
||||||
|
"""
|
||||||
|
return self.base_code[0] not in {"1", "2", "3"}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def query_values(self) -> list[str]:
|
def query_values(self) -> list[str]:
|
||||||
"""Returns the values to be queried.
|
"""Returns the values to be queried.
|
||||||
|
Loading…
Reference in New Issue
Block a user