diff --git a/trytond/backend/sqlite/database.py b/trytond/backend/sqlite/database.py index 139a1894e8..d74d949029 100644 --- a/trytond/backend/sqlite/database.py +++ b/trytond/backend/sqlite/database.py @@ -303,7 +303,7 @@ class Database(DatabaseInterface): def init(self): from trytond.modules import get_module_info - with self._conn as conn: + with self.get_connection() as conn: cursor = conn.cursor() sql_file = os.path.join(os.path.dirname(__file__), 'init.sql') with open(sql_file) as fp: