adamcharnock / django-hordak

Double entry accounting in Django
http://django-hordak.readthedocs.io
MIT License
228 stars 55 forks source link

Accounts should not be created with multiple currencies by default (comments welcome) #118

Closed adamcharnock closed 1 week ago

adamcharnock commented 1 month ago

Currently accounts are created with multiple currencies by default (assuming more than once currency is listed for the project). This seems counterintuitive, as I would think that only currency exchange accounts would really need this feature.

# From the Account model
    currencies = JSONField(
        db_index=True,
        default=project_currencies,
        verbose_name=_("currencies"),
    )

I propose we change this to being set to DEFAULT_CURRENCY in Hordak 2.0. Thoughts?

adamcharnock commented 1 week ago

I'm working on this now. Making this change removes the need for project_currencies(), and I have therefore removed it.

However, it seems this provided the option to specify the CURRENCIES setting as a callable. @nitsujri, could you talk more about your use case for this? If it is compelling then I can put this feature back in.

Otherwise I'll omit it for the 2.0.0 release and see if anyone shouts about it.

adamcharnock commented 1 week ago

Closing this to keep track of v2 progress, so @-mention me if you need to get my attention.