Per-user accounts still currency-constrained to EUR/SATS/USD — CAD/GBP/JPY bean-check errors persist #49
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in the high-effort code review of PR #46.
PR #46 made admin-created chart accounts write an unconstrained Open directive (
models.pyCreateChartAccount.currenciesnow defaults toNone). The model comment justifies this by citing "the CAD/GBP/JPY bean-check errors we saw on user accounts."But the per-user account path was not changed —
crud.py:255(get_or_create_user_account) still opens accounts constrained to three currencies:Those are exactly the accounts that threw
Invalid currency CAD for account 'Assets:Receivable:User-…'(alsoGBP,JPY) in the dev ledger — so the original bug persists on the path that actually exhibits it. The fix landed on the new admin feature instead.Options
currencies=None), matching the chart-account behavior, ormodels.pycomment so it doesn't claim a fix it didn't make.Recommend the former for consistency, since per-user receivable/payable accounts legitimately hold arbitrary fiat.
Fixed and shipped in v0.4.0 (PR #46, catalog updated).
26eb9d4—get_or_create_user_accountnow opens per-user accounts unconstrained (currencies=None), so receivable/payable accounts hold arbitrary fiat (CAD/GBP/JPY/…) without tripping bean-check. Verified end-to-end against the real Beancount parser (bean-checkclean on a CAD posting to an unconstrainedUser-account).