Cédric Krier pushed to branch branch/default at Tryton / Tryton


Commits:
c4674b8f by Cédric Krier at 2023-01-21T18:47:49+01:00
Lock journal period when automatically creating one

This avoids uniqueness constraint error in case of concurrent creation.

Closes #10747
- - - - -


1 changed file:

- modules/account/move.py


Changes:

=====================================
modules/account/move.py
=====================================
@@ -1227,6 +1227,7 @@
                     gettext('account.msg_modify_line_closed_journal_period',
                         journal_period=journal_period.rec_name))
         else:
+            JournalPeriod.lock()
             JournalPeriod.create([{
                         'journal': journal.id,
                         'period': period.id,



View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/c4674b8f6fbda574212a4b1768afd86f4651f7c7

-- 
View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/c4674b8f6fbda574212a4b1768afd86f4651f7c7
You're receiving this email because of your account on foss.heptapod.net.


Reply via email to