details: https://code.tryton.org/tryton/commit/bf8cbd4c87e0
branch: 7.6
user: Cédric Krier <[email protected]>
date: Wed Oct 22 12:37:59 2025 +0200
description:
Do not migrate the account periods to a strict sequence if there is no
sequence
Closes #14308
(grafted from c109a253ceb4030e3353e69a70992d5b2ce1fcce)
diffstat:
modules/account/period.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (22 lines):
diff -r 3d42f50edf22 -r bf8cbd4c87e0 modules/account/period.py
--- a/modules/account/period.py Tue Jul 29 09:25:00 2025 +0200
+++ b/modules/account/period.py Wed Oct 22 12:37:59 2025 +0200
@@ -1,6 +1,7 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
+from sql import Null
from sql.operators import Equal, NotEqual
from trytond.cache import Cache
@@ -139,7 +140,9 @@
fiscalyear.move_sequence))
old2new.update(cursor)
- cursor.execute(*t.select(t.post_move_sequence, distinct=True))
+ cursor.execute(*t.select(
+ t.post_move_sequence, distinct=True,
+ where=t.post_move_sequence != Null))
for sequence_id, in cursor:
if sequence_id not in old2new:
sequence = Sequence(sequence_id)