From d8499a4fb09b3f464046674be8c47ed533bfa65d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Thu, 16 Oct 2025 16:07:52 +0200 Subject: [PATCH] Allow to use empty ModelList in Wizard We might want to execute the wizard on a specific model even without selecting some of its records Closes #14291 --- proteus/proteus/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proteus/proteus/__init__.py b/proteus/proteus/__init__.py index b57a762ca7..1af3e85907 100644 --- a/proteus/proteus/__init__.py +++ b/proteus/proteus/__init__.py @@ -1242,6 +1242,10 @@ class Wizard(object): ctx['active_id'] = self.models[0].id ctx['active_ids'] = [model.id for model in self.models] ctx['active_model'] = self.models[0].__class__.__name__ + elif isinstance(self.models, ModelList): + ctx['active_id'] = None + ctx['active_ids'] = None + ctx['active_model'] = self.models.model_name else: ctx['active_id'] = None ctx['active_ids'] = None