From b88d9004efbbb1fafc66ace325afe0f35cadd148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 13 Jun 2025 17:40:28 +0200 Subject: [PATCH] Replace menu entry for upgrade module wizard by multiple button on module list --- trytond/trytond/ir/module.py | 6 ++++++ trytond/trytond/ir/module.xml | 22 ++++++++++------------ trytond/trytond/ir/view/module_list.xml | 1 + 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/trytond/trytond/ir/module.py b/trytond/trytond/ir/module.py index 3bc8d703c3..ddb000c192 100644 --- a/trytond/trytond/ir/module.py +++ b/trytond/trytond/ir/module.py @@ -81,6 +81,7 @@ class Module(ModelSQL, ModelView): ['to activate', 'to remove', 'to upgrade']), 'depends': ['state'], }, + 'apply': {}, }) @staticmethod @@ -235,6 +236,11 @@ class Module(ModelSQL, ModelView): def _cancel_upgrade(cls, modules): cls.write(modules, {'state': 'activated'}) + @classmethod + @ModelView.button_action('ir.act_module_activate_upgrade') + def apply(cls, modules): + pass + @classmethod def update_list(cls): "Update the list of available modules" diff --git a/trytond/trytond/ir/module.xml b/trytond/trytond/ir/module.xml index cddac7fa89..133defe7c1 100644 --- a/trytond/trytond/ir/module.xml +++ b/trytond/trytond/ir/module.xml @@ -82,6 +82,16 @@ this repository contains the full copyright notices and license terms. --> + + ir.module + apply + Apply + + + + + + ir.module @@ -170,12 +180,6 @@ this repository contains the full copyright notices and license terms. --> - - - form_action - ir.module,-1 - - ir.module.activate_upgrade.start form @@ -188,12 +192,6 @@ this repository contains the full copyright notices and license terms. --> module_activate_upgrade_done_form - - Configure Modules ir.module.config diff --git a/trytond/trytond/ir/view/module_list.xml b/trytond/trytond/ir/view/module_list.xml index 23e04f81d6..c00ef01910 100644 --- a/trytond/trytond/ir/view/module_list.xml +++ b/trytond/trytond/ir/view/module_list.xml @@ -7,4 +7,5 @@ this repository contains the full copyright notices and license terms. -->