details:   https://code.tryton.org/tryton/commit/8b86479f2624
branch:    7.4
user:      Nicolas Évrard <[email protected]>
date:      Thu Oct 16 16:07:52 2025 +0200
description:
        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)
diffstat:

 proteus/proteus/__init__.py |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 1cbcd7265833 -r 8b86479f2624 proteus/proteus/__init__.py
--- a/proteus/proteus/__init__.py       Thu Nov 20 10:14:13 2025 +0100
+++ b/proteus/proteus/__init__.py       Thu Oct 16 16:07:52 2025 +0200
@@ -1238,6 +1238,10 @@
                 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

Reply via email to