From 5b3fdc90f0887ced150de4841d9ad411a96de75a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 4 Jan 2022 22:17:13 +0100 Subject: [PATCH] Lock move table when closing period issue11093 review395221002 (grafted from 5de33b3f0b7687f57c3dc7f2db62fb4b4bfe6abd) --HG-- branch : 6.0 --- period.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/period.py b/period.py index 69f41f7dde..a92fa62747 100644 --- a/period.py +++ b/period.py @@ -302,8 +302,9 @@ class Period(Workflow, ModelSQL, ModelView): database = transaction.database connection = transaction.connection - # 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 database.lock(connection, JournalPeriod._table) + database.lock(connection, Move._table) unposted_moves = Move.search([ ('period', 'in', [p.id for p in periods]),