diff --git a/conservancy_beancount/reports/accrual.py b/conservancy_beancount/reports/accrual.py index eb3b137..074b831 100644 --- a/conservancy_beancount/reports/accrual.py +++ b/conservancy_beancount/reports/accrual.py @@ -756,13 +756,14 @@ def main(arglist: Optional[Sequence[str]]=None, if rt_wrapper is None: logger.error("unable to generate aging report: RT client is required") else: - now = datetime.datetime.now() if args.output_file is None: + now = datetime.datetime.now() out_dir_path = config.repository_path() or Path() args.output_file = out_dir_path / now.strftime('AgingReport_%Y-%m-%d_%H:%M.ods') logger.info("Writing report to %s", args.output_file) out_bin = cliutil.bytes_output(args.output_file, stdout) report = AgingReport(rt_wrapper, out_bin) + report.ods.set_common_properties(config.books_repo()) elif args.report_type is ReportType.OUTGOING: rt_wrapper = config.rt_wrapper() if rt_wrapper is None: diff --git a/conservancy_beancount/reports/fund.py b/conservancy_beancount/reports/fund.py index 90df1ff..4affa81 100644 --- a/conservancy_beancount/reports/fund.py +++ b/conservancy_beancount/reports/fund.py @@ -394,6 +394,7 @@ def main(arglist: Optional[Sequence[str]]=None, report.write(fund_map.items()) else: ods_report = ODSReport(args.start_date, args.stop_date) + ods_report.set_common_properties(config.books_repo()) ods_report.write(fund_map.items()) if args.output_file is None: out_dir_path = config.repository_path() or Path() diff --git a/conservancy_beancount/reports/ledger.py b/conservancy_beancount/reports/ledger.py index e180910..9929eaf 100644 --- a/conservancy_beancount/reports/ledger.py +++ b/conservancy_beancount/reports/ledger.py @@ -809,6 +809,7 @@ def main(arglist: Optional[Sequence[str]]=None, except ValueError as error: logger.error("%s: %r", *error.args) return 2 + report.set_common_properties(config.books_repo()) report.write(postings) if not any(report.account_groups.values()): logger.warning("no matching postings found to report") diff --git a/setup.py b/setup.py index beb8920..f09adeb 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup setup( name='conservancy_beancount', description="Plugin, library, and reports for reading Conservancy's books", - version='1.6.2', + version='1.6.3', author='Software Freedom Conservancy', author_email='info@sfconservancy.org', license='GNU AGPLv3+', diff --git a/tests/testutil.py b/tests/testutil.py index 74ae8f2..def9075 100644 --- a/tests/testutil.py +++ b/tests/testutil.py @@ -271,6 +271,9 @@ class TestConfig: def books_loader(self): return self._books_loader + def books_repo(self): + return None + def config_file_path(self): return test_path('userconfig/conservancy_beancount/config.ini')