Get name for wizards not linked to a model

Closes #14033
(grafted from 20cdba7a1bf3738eba3d474d4d5f366a758d1010)

--HG--
branch : 7.0
This commit is contained in:
Nicolas Évrard
2025-09-14 15:27:16 +02:00
parent 8238323950
commit cdc10ed0fd
+6 -2
View File
@@ -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