details:   https://code.tryton.org/tryton/commit/04939bba4657
branch:    6.0
user:      Cédric Krier <[email protected]>
date:      Mon Dec 15 11:44:21 2025 +0100
description:
        Return the journal for a bank account if only one journal matches

        Closes #14422
        (grafted from 3c64a52035111a978e237d0bb358247a4ac0bab2)
diffstat:

 modules/account_statement/journal.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (11 lines):

diff -r fdfd325d8d6b -r 04939bba4657 modules/account_statement/journal.py
--- a/modules/account_statement/journal.py      Wed Dec 17 19:44:38 2025 +0100
+++ b/modules/account_statement/journal.py      Mon Dec 15 11:44:21 2025 +0100
@@ -112,6 +112,6 @@
                     ('bank_account.numbers.number_compact', '=', number),
                     ],
                 ])
-        if journals:
+        if len(journals) == 1:
             journal, = journals
             return journal

Reply via email to