[FIX] upgrade_analysis : avoid KeyError "module"

Check "module" is in context when patching init_models
pull/2624/head
Guillaume MASSON 2023-05-17 18:13:01 +02:00
parent 89f8e7b56f
commit 250fbe2d4e
1 changed files with 13 additions and 12 deletions

View File

@ -15,6 +15,7 @@ class RegistryPatch(OdooPatch):
method_names = ["init_models"]
def init_models(self, cr, model_names, context, install=True):
if "module" in context:
module_name = context["module"]
_logger.debug("Logging models of module %s", module_name)
upg_registry = current_thread()._upgrade_registry