From 8ac07169a3dade99960024ed112dff8092ebe02c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 6 Aug 2023 01:04:24 +0200 Subject: [PATCH] Cancel cancelling move instead of delete in test scenario Since efdb98eb55e5 cancel move is posted of the cancelled move is already posted. So the cancelling move can no more be deleted, instead it must be cancelled without reversal to have the same effect. --- .../tests/scenario_analytic_account.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/analytic_account/tests/scenario_analytic_account.rst b/modules/analytic_account/tests/scenario_analytic_account.rst index 04ea7e34da..0f208f32f9 100644 --- a/modules/analytic_account/tests/scenario_analytic_account.rst +++ b/modules/analytic_account/tests/scenario_analytic_account.rst @@ -117,8 +117,14 @@ Cancel reversal move:: >>> reconciliations = { ... l.reconciliation for l in cancel_move.lines if l.reconciliation} >>> Reconciliation.delete(list(reconciliations)) - >>> cancel_move.reload() - >>> cancel_move.delete() + >>> cancel_move = Wizard('account.move.cancel', [cancel_move]) + >>> cancel_move.form.reversal = False + >>> cancel_move.execute('cancel') + >>> analytic_account.reload() + >>> analytic_account.credit + Decimal('42.00') + >>> analytic_account.debit + Decimal('0.00') Cancel move::