changeset c1671dbe66ff in modules/account_payment:default
details:
https://hg.tryton.org/modules/account_payment?cmd=changeset;node=c1671dbe66ff
description:
Use account expense instead of journal in test scenario
issue9768
review320261002
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 8ca9d56d12ef -r c1671dbe66ff tests/scenario_account_payment.rst
--- a/tests/scenario_account_payment.rst Sat Oct 24 13:45:10 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 8ca9d56d12ef -r c1671dbe66ff tests/scenario_account_payment_planning.rst
--- a/tests/scenario_account_payment_planning.rst Sat Oct 24 13:45:10
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'))