changeset cdb68a1eccec in modules/account_deposit:default
details:
https://hg.tryton.org/modules/account_deposit?cmd=changeset&node=cdb68a1eccec
description:
Test recalling too much deposit
issue10399
review348381002
diffstat:
tests/scenario_deposit.rst | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diffs (22 lines):
diff -r eab463f01fae -r cdb68a1eccec tests/scenario_deposit.rst
--- a/tests/scenario_deposit.rst Sun May 16 17:46:47 2021 +0200
+++ b/tests/scenario_deposit.rst Sun May 16 17:47:59 2021 +0200
@@ -94,3 +94,18 @@
Decimal('-100.00')
>>> invoice.untaxed_amount
Decimal('400.00')
+
+Recall too much::
+
+ >>> deposit_line.unit_price = Decimal('-200.00')
+ >>> deposit_line.save()
+ >>> invoice.click('post') # doctest: +IGNORE_EXCEPTION_DETAIL
+ Traceback (most recent call last):
+ ...
+ DepositError: ...
+
+Recall available::
+
+ >>> deposit_line.unit_price = Decimal('-100.00')
+ >>> deposit_line.save()
+ >>> invoice.click('post')