Lock move table when closing period

issue11093
review395221002
This commit is contained in:
Cédric Krier committed 2022-01-04 22:17:13 +01:00
1 parent f4e06cb568
commit 12c2bc14e7
1 file changed
+2 -1
+2 -1
View File
@@ -302,8 +302,9 @@ class Period(Workflow, ModelSQL, ModelView):
Account = pool.get('account.account')
transaction = Transaction()
# Lock period to be sure no new period will be created in between.
# Lock period and move to be sure no new record will be created
JournalPeriod.lock()
Move.lock()
for period in periods:
with transaction.set_context(