From 28e4d67df813dd7fcf6f38c2e92f22d912740a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 6 Oct 2014 22:22:08 +0200 Subject: [PATCH] Use new cursor to check access in ModuleInstallUpgrade check_access take a lock on many tables and so it prevents those tables to be modified by the installation/upgrade process as far as the cursor is not closed. issue4223 review13571002 --- trytond/ir/module/module.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/trytond/ir/module/module.py b/trytond/ir/module/module.py index 76dca70cbb..8153bde1db 100644 --- a/trytond/ir/module/module.py +++ b/trytond/ir/module/module.py @@ -483,6 +483,12 @@ class ModuleInstallUpgrade(Wizard): ]) config = StateAction('ir.act_module_config_wizard') + @classmethod + def check_access(cls): + # Use new cursor to prevent lock when installing modules + with Transaction().new_cursor(): + super(ModuleInstallUpgrade, cls).check_access() + @staticmethod def default_start(fields): pool = Pool()