From 74bfb4af967c754f2797db373eb0958e13d085d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 24 Oct 2024 15:45:40 +0200 Subject: [PATCH] Do not force to lock table at the transaction start when updating module --- trytond/trytond/modules/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trytond/trytond/modules/__init__.py b/trytond/trytond/modules/__init__.py index a30329c23f..3291d25a14 100644 --- a/trytond/trytond/modules/__init__.py +++ b/trytond/trytond/modules/__init__.py @@ -153,6 +153,10 @@ def load_module_graph(graph, pool, update=None, lang=None, indexes=None): code = get_parent_language(code) transaction = Transaction() + # Do not force to lock table at the transaction start + # as the table may not exist yet + transaction.lock_table = lambda t: transaction.database.lock( + transaction.connection, t) with transaction.connection.cursor() as cursor: modules = [x.name for x in graph] module2state = dict()