Closed tbm closed 8 years ago
Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).
This is a known issue. Only the top-level's options_map is filled in. I haven't defined a sensible way to aggregate multiple options_maps together, which is required to do this correctly. Another option would be for me to recycle the options_map across multiple files. This will require more thought and possibly some wide-ranging changes, not a small task I can address right now.
I'd rather pick and choose to address those specific fields you need in the meantime. Is the "commodities" the only field you need?
Original comment by Dominik Aumayr (GitHub: aumayr).
Only the two fields commodities
and operating_currency
are the ones I need for beancount-web
to work properly.
Original report by Dominik Aumayr (GitHub: aumayr).
This was first reported by yegle here.
It looks like
beancount.loader.load_file
does not return a correctoptions_map
when usinginclude
directives: The keysoperating_currency
andcommodities
are missing or reporting the wrong value.Here's a minimal test case that demonstrate the problem.
invest.bean
accounts.bean
a.bean
b.bean
beancount.loader.load_files
returns anoptions_map
without the keycommodities
. When definingoption "operating_currency" "USD"
in one of the included files this key is also missing fromoptions_map
.Use
bean-report -f beancount invest.bean print > /tmp/output.beancount
toconcatenate
everything into a single file, andbeancount.loader.load_files
returns a correctoptions_map
.