From cdc10ed0fdbd335d56492073d7ee53bf659fbaec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Sun, 14 Sep 2025 15:27:16 +0200 Subject: [PATCH] Get name for wizards not linked to a model Closes #14033 (grafted from 20cdba7a1bf3738eba3d474d4d5f366a758d1010) --HG-- branch : 7.0 --- trytond/trytond/ir/action.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/trytond/trytond/ir/action.py b/trytond/trytond/ir/action.py index 7c20ad8e58..281098d8b1 100644 --- a/trytond/trytond/ir/action.py +++ b/trytond/trytond/ir/action.py @@ -1090,8 +1090,12 @@ class ActionWizard(ActionMixin, ModelSQL, ModelView): # TODO add cache actions = cls.search([ (cls._action_name, '=', name), - ('model', '=', model), - ], limit=1) + ['OR', + ('model', '=', model), + ('model', '=', None), + ], + ], + order=[('model', 'ASC NULLS LAST')]) if actions: action, = actions return action.name