changeset 382e1676d181 in modules/account:default details: https://hg.tryton.org/modules/account?cmd=changeset;node=382e1676d181 description: Add test for General Ledger Account amounts
issue7838 review47721002 diffstat: tests/scenario_reports.rst | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diffs (28 lines): diff -r e2cc34d17a01 -r 382e1676d181 tests/scenario_reports.rst --- a/tests/scenario_reports.rst Mon Dec 03 11:35:19 2018 +0100 +++ b/tests/scenario_reports.rst Mon Dec 03 11:38:03 2018 +0100 @@ -94,6 +94,24 @@ ... }) >>> _ = general_ledger.execute(gl_accounts) + >>> context = { + ... 'company': company.id, + ... 'fiscalyear': fiscalyear.id, + ... 'start_period': fiscalyear.periods[1].id, + ... } + >>> with config.set_context(context): + ... gl_revenue, = GeneralLedgerAccount.find([ + ... ('name', '=', revenue.name), + ... ]) + >>> gl_revenue.start_balance + Decimal('-10.00') + >>> gl_revenue.credit + Decimal('0.00') + >>> gl_revenue.debit + Decimal('0.00') + >>> gl_revenue.end_balance + Decimal('-10.00') + >>> trial_balance = Report('account.trial_balance', context={ ... 'company': company.id, ... 'fiscalyear': fiscalyear.id,