accounting.option package

Submodules

accounting.option.forms module

The forms for the option management.

class accounting.option.forms.AccountNotCurrent

Bases: object

The validator to check that the account is a current account.

class accounting.option.forms.CurrentAccountExists

Bases: object

The validator to check that the current account exists.

class accounting.option.forms.NotStartPayableFromExpense

Bases: object

The validator to check that a payable line item does not start from expense.

class accounting.option.forms.NotStartReceivableFromIncome

Bases: object

The validator to check that a receivable line item does not start from income.

class accounting.option.forms.OptionForm(*args, **kwargs)

Bases: FlaskForm

The form to update the options.

property current_accounts: list[CurrentAccount]

Returns the current accounts.

Returns:

The current accounts.

default_currency_code = <UnboundField(StringField, (), {'filters': [<function strip_text>], 'validators': [<wtforms.validators.DataRequired object>, <accounting.forms.CurrencyExists object>]})>

The default currency code.

default_ie_account_code = <UnboundField(StringField, (), {'filters': [<function strip_text>], 'validators': [<wtforms.validators.DataRequired object>, <accounting.option.forms.CurrentAccountExists object>, <accounting.option.forms.AccountNotCurrent object>]})>

The default account code for the income and expenses log.

populate_obj(obj: Options) None

Populates the form data into a currency object.

Parameters:

obj – The currency object.

Returns:

None.

recurring = <UnboundField(FormField, (<class 'accounting.option.forms.RecurringForm'>,), {})>

The recurring expenses and incomes.

class accounting.option.forms.RecurringExpenseForm(*args, **kwargs)

Bases: RecurringItemForm

The sub-form to add or update the recurring expenses.

account_code = <UnboundField(StringField, (), {'filters': [<function strip_text>], 'validators': [<wtforms.validators.DataRequired object>, <accounting.forms.AccountExists object>, <accounting.forms.IsDebitAccount object>, <accounting.option.forms.NotStartPayableFromExpense object>]})>

The account code.

description_template = <UnboundField(StringField, (), {'filters': [<function strip_text>], 'validators': [<wtforms.validators.DataRequired object>]})>

The template for the line item description.

name = <UnboundField(StringField, (), {'filters': [<function strip_text>], 'validators': [<wtforms.validators.DataRequired object>]})>

The name of the recurring item.

no = <UnboundField(IntegerField, (), {})>

The order number of this recurring item.

class accounting.option.forms.RecurringForm(*args, **kwargs)

Bases: RecurringItemForm

The sub-form for the recurring expenses and incomes.

property as_data: dict[str, list[tuple[str, str, str]]]

Returns the form data.

Returns:

The form data.

property expense_accounts: list[Account]

The expense accounts.

Returns:

None.

expenses = <UnboundField(FieldList, (<UnboundField(FormField, (<class 'accounting.option.forms.RecurringExpenseForm'>,), {})>,), {})>

The recurring expenses.

property income_accounts: list[Account]

The income accounts.

Returns:

None.

incomes = <UnboundField(FieldList, (<UnboundField(FormField, (<class 'accounting.option.forms.RecurringIncomeForm'>,), {})>,), {})>

The recurring incomes.

property item_template: str

Returns the template of a recurring item.

Returns:

The template of a recurring item.

class accounting.option.forms.RecurringIncomeForm(*args, **kwargs)

Bases: RecurringItemForm

The sub-form to add or update the recurring incomes.

account_code = <UnboundField(StringField, (), {'filters': [<function strip_text>], 'validators': [<wtforms.validators.DataRequired object>, <accounting.forms.AccountExists object>, <accounting.forms.IsCreditAccount object>, <accounting.option.forms.NotStartReceivableFromIncome object>]})>

The account code.

description_template = <UnboundField(StringField, (), {'filters': [<function strip_text>], 'validators': [<wtforms.validators.DataRequired object>]})>

The description template.

name = <UnboundField(StringField, (), {'filters': [<function strip_text>], 'validators': [<wtforms.validators.DataRequired object>]})>

The name of the recurring item.

no = <UnboundField(IntegerField, (), {})>

The order number of this recurring item.

class accounting.option.forms.RecurringItemForm(*args, **kwargs)

Bases: FlaskForm

The base sub-form to add or update the recurring item.

account_code = <UnboundField(StringField, (), {})>

The account code.

property account_text: str | None

Returns the account text.

Returns:

The account text.

property all_errors: list[str | LazyString]

Returns all the errors of the form.

Returns:

All the errors of the form.

description_template = <UnboundField(StringField, (), {})>

The description template.

name = <UnboundField(StringField, (), {})>

The name of the recurring item.

no = <UnboundField(IntegerField, (), {})>

The order number of this recurring item.

accounting.option.views module

The views for the option management.

accounting.option.views.bp: Blueprint = <Blueprint 'option'>

The view blueprint for the currency management.

Module contents

The option management.

accounting.option.init_app(bp: Blueprint) None

Initialize the application.

Parameters:

bp – The blueprint of the accounting application.

Returns:

None.