From 0b121da0fcd51d27254436b57500bbbe86a46fd5 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 (grafted from 93ccf0b37bb2fcf18a44ef13e37b6029487b9f62) --HG-- branch : 6.0 --- proteus/proteus/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proteus/proteus/__init__.py b/proteus/proteus/__init__.py index fd406b5939..ae2a25001f 100644 --- a/proteus/proteus/__init__.py +++ b/proteus/proteus/__init__.py @@ -1220,6 +1220,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