changeset 9cf7589e779b in modules/account_payment_clearing:default
details:
https://hg.tryton.org/modules/account_payment_clearing?cmd=changeset&node=9cf7589e779b
description:
Allow only lines with maturity date to be paid
issue11364
review403191002
diffstat:
tests/scenario_account_negative_payment_clearing.rst | 3 ++-
tests/scenario_account_payment_clearing.rst | 12 ++++++++----
2 files changed, 10 insertions(+), 5 deletions(-)
diffs (56 lines):
diff -r cd88c9b7ff53 -r 9cf7589e779b
tests/scenario_account_negative_payment_clearing.rst
--- a/tests/scenario_account_negative_payment_clearing.rst Mon Apr 11
20:51:41 2022 +0200
+++ b/tests/scenario_account_negative_payment_clearing.rst Mon Apr 11
22:23:58 2022 +0200
@@ -67,7 +67,8 @@
>>> Move = Model.get('account.move')
>>> move = Move()
>>> move.journal = expense_journal
- >>> line = move.lines.new(account=payable, party=supplier,
+ >>> line = move.lines.new(
+ ... account=payable, party=supplier, maturity_date=today,
... debit=Decimal('-50.00'))
>>> line = move.lines.new(account=expense, credit=Decimal('-50.00'))
>>> move.click('post')
diff -r cd88c9b7ff53 -r 9cf7589e779b tests/scenario_account_payment_clearing.rst
--- a/tests/scenario_account_payment_clearing.rst Mon Apr 11 20:51:41
2022 +0200
+++ b/tests/scenario_account_payment_clearing.rst Mon Apr 11 22:23:58
2022 +0200
@@ -78,7 +78,8 @@
>>> Move = Model.get('account.move')
>>> move = Move()
>>> move.journal = expense_journal
- >>> line = move.lines.new(account=payable, party=supplier,
+ >>> line = move.lines.new(
+ ... account=payable, party=supplier, maturity_date=today,
... credit=Decimal('50.00'))
>>> line = move.lines.new(account=expense, debit=Decimal('50.00'))
>>> move.click('post')
@@ -345,7 +346,8 @@
>>> move = Move()
>>> move.journal = expense_journal
>>> line = move.lines.new(
- ... account=payable, party=supplier, credit=Decimal('20.00'),
+ ... account=payable, party=supplier, maturity_date=today,
+ ... credit=Decimal('20.00'),
... amount_second_currency=Decimal('-40.00'), second_currency=euro)
>>> line = move.lines.new(
... account=expense, debit=Decimal('20.00'),
@@ -384,7 +386,8 @@
>>> move = Move()
>>> move.journal = revenue_journal
- >>> line = move.lines.new(account=receivable, party=customer,
+ >>> line = move.lines.new(
+ ... account=receivable, party=customer, maturity_date=today,
... debit=Decimal('50.00'), second_currency=euro,
... amount_second_currency=Decimal('100.0'))
>>> line = move.lines.new(account=revenue, credit=Decimal('50.00'))
@@ -428,7 +431,8 @@
>>> move = Move()
>>> move.journal = expense_journal
- >>> line = move.lines.new(account=payable, party=supplier,
+ >>> line = move.lines.new(
+ ... account=payable, party=supplier, maturity_date=today,
... credit=Decimal('50.00'))
>>> line = move.lines.new(account=expense, debit=Decimal('50.00'))
>>> move.click('post')