Lock move table when closing period
issue11093 review395221002 (grafted from 5de33b3f0b7687f57c3dc7f2db62fb4b4bfe6abd) --HG-- branch : 6.0
This commit is contained in:
1 parent
47bc54fb27
commit
5b3fdc90f0
1 file changed
+2
-1
@@ -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]),
|
||||
|
||||
Reference in new issue
Block a user