changeset 4f29345aa9d1 in modules/account_payment:5.6 details: https://hg.tryton.org/modules/account_payment?cmd=changeset;node=4f29345aa9d1 description: Use account expense instead of journal in test scenario
issue9768 review320261002 (grafted from c1671dbe66ffa28d4d00cb6f4867dd2f428b1c90) diffstat: tests/scenario_account_payment.rst | 5 +++-- tests/scenario_account_payment_planning.rst | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diffs (48 lines): diff -r 9a2db46c0cc1 -r 4f29345aa9d1 tests/scenario_account_payment.rst --- a/tests/scenario_account_payment.rst Mon May 04 12:10:16 2020 +0200 +++ b/tests/scenario_account_payment.rst Wed Oct 28 23:35:28 2020 +0100 @@ -32,9 +32,10 @@ >>> _ = create_chart(company) >>> accounts = get_accounts(company) >>> payable = accounts['payable'] + >>> expense = accounts['expense'] >>> Journal = Model.get('account.journal') - >>> expense, = Journal.find([('code', '=', 'EXP')]) + >>> expense_journal, = Journal.find([('code', '=', 'EXP')]) Create payment journal:: @@ -55,7 +56,7 @@ >>> Move = Model.get('account.move') >>> move = Move() - >>> move.journal = expense + >>> move.journal = expense_journal >>> line = move.lines.new(account=payable, party=supplier, ... credit=Decimal('50.00')) >>> line = move.lines.new(account=expense, debit=Decimal('50.00')) diff -r 9a2db46c0cc1 -r 4f29345aa9d1 tests/scenario_account_payment_planning.rst --- a/tests/scenario_account_payment_planning.rst Mon May 04 12:10:16 2020 +0200 +++ b/tests/scenario_account_payment_planning.rst Wed Oct 28 23:35:28 2020 +0100 @@ -35,9 +35,10 @@ >>> _ = create_chart(company) >>> accounts = get_accounts(company) >>> payable = accounts['payable'] + >>> expense = accounts['expense'] >>> Journal = Model.get('account.journal') - >>> expense, = Journal.find([('code', '=', 'EXP')]) + >>> expense_journal, = Journal.find([('code', '=', 'EXP')]) Create payment journal:: @@ -56,7 +57,7 @@ >>> Move = Model.get('account.move') >>> move = Move() - >>> move.journal = expense + >>> move.journal = expense_journal >>> line = move.lines.new(account=payable, party=supplier, ... credit=Decimal('50.00'), maturity_date=next_week) >>> line = move.lines.new(account=expense, debit=Decimal('50.00'))