Issue #359: Custom root account names and includes (blais/beancount)

32 views
Skip to first unread message

Florian Preinstorfer

unread,
Jan 17, 2019, 3:16:08 PM1/17/19
to bean...@googlegroups.com
New issue 359: Custom root account names and includes
https://bitbucket.org/blais/beancount/issues/359/custom-root-account-names-and-includes

Florian Preinstorfer:

I'm using the `name_{assets,liabilities,equity,income,expenses}` options to specify custom root account names. This works fine when using a single file. In case another file is in included, those options have to be repeated in each included file to avoid `ValueError: Invalid account name` exceptions.

A minimal example: `test.beancount`:


```
option "operating_currency" "USD"
option "name_assets" "ASSETS"
option "name_liabilities" "LIABILITIES"
option "name_equity" "EQUITY"
option "name_income" "INCOME"
option "name_expenses" "EXPENSES"

include "included.beancount"

2019-01-01 open ASSETS:Checking:Bank
2019-01-01 open EXPENSES:Food
```

and `included.beancount`:

```
2019-01-05 * "BurgerBar" "some burger"
EXPENSES:Food 20.00 USD
ASSETS:Checking:Bank
```

results in:
```
$ bean-check test.beancount
included.beancount:2: ValueError: Invalid account name: EXPENSES:Food
included.beancount:3: ValueError: Invalid account name: ASSETS:Checking:Bank
```

There are two workarounds: either use the default account names and remove all `name_*` options or repeat the `name_*` options in each included file.

* Beancount: 2.2.0
* Python: 3.7.2


Reply all
Reply to author
Forward
0 new messages