@@ -61,7 +61,7 @@ def _run_migration(self, db_name, script_name):
6161 sys .path = path
6262
6363 utils .info (f"Executing { script .__name__ .replace ('_' , ' ' )} script" )
64- with self .env (db_name ) as env :
64+ with self .env (db_name , minimal = True ) as env :
6565 version = utils .Version (
6666 env ["ir.config_parameter" ].get_param ("db_version" , False )
6767 )
@@ -85,7 +85,7 @@ def _run_migration_sql(self, db_name, script_name):
8585
8686 def _get_installed_modules (self , db_name ):
8787 """Return the list of modules which are installed"""
88- with self .env (db_name , False ) as env :
88+ with self .env (db_name , False , minimal = True ) as env :
8989 domain = [("state" , "=" , "installed" )]
9090 installed = env ["ir.module.module" ].search (domain ).mapped ("name" )
9191 return set (installed ).union (["base" ])
@@ -120,7 +120,7 @@ def check_auto_install(self, db_name):
120120 """Install auto installable modules if the dependencies are installed"""
121121 states = frozenset (("installed" , "to install" , "to upgrade" ))
122122
123- with self .env (db_name , False ) as env :
123+ with self .env (db_name , False , minimal = True ) as env :
124124 countries = env ["res.company" ].search ([]).mapped ("country_id" )
125125
126126 domain = [("state" , "=" , "uninstalled" ), ("auto_install" , "=" , True )]
@@ -158,7 +158,7 @@ def check_auto_install(self, db_name):
158158
159159 def update_checksums (self , db_name ):
160160 """Only update the module checksums in the database"""
161- with self .env (db_name , False ) as env :
161+ with self .env (db_name , False , minimal = True ) as env :
162162 model = env ["ir.module.module" ]
163163 if hasattr (model , "_save_installed_checksums" ):
164164 utils .info ("Updating module checksums" )
@@ -202,7 +202,7 @@ def update_specific(
202202 def update_changed (self , db_name , blacklist = None ):
203203 """Update only changed modules"""
204204 utils .info ("Updating changed modules" )
205- with self .env (db_name , False ) as env :
205+ with self .env (db_name , False , minimal = True ) as env :
206206 model = env ["ir.module.module" ]
207207 if hasattr (model , "upgrade_changed_checksum" ):
208208 # Initialize `res.company`, `res.partner` and `res.users` to prevent
0 commit comments