From a2662386c32ef3dee7df249f838c5d00537f0981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Sun, 29 Jan 2023 01:08:22 +0100 Subject: [PATCH] Save moves before reconciling the lines The previous organization of the code made it less efficient to save the move before reconciling the lines which should the logical order. --- modules/account/move.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/account/move.py b/modules/account/move.py index b4d59c0157..df4f332504 100644 --- a/modules/account/move.py +++ b/modules/account/move.py @@ -479,6 +479,8 @@ class Move(ModelSQL, ModelView): move.post_date = Date.today() move.post_number = move.period.post_move_sequence_used.get() + cls.save(moves) + def keyfunc(line): return line.party, line.account to_reconcile = Line.browse(sorted( @@ -488,8 +490,6 @@ class Move(ModelSQL, ModelView): if to_reconcile: Line.reconcile(*to_reconcile) - cls.save(moves) - class Reconciliation(ModelSQL, ModelView): 'Account Move Reconciliation Lines'