From b8cf940247ce746bf2ccdd77cbcb9bfde5c026d2 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 28 Jun 2017 15:36:17 +0200 Subject: [ADD] base: new wizard to uninstall a module (#17284) The "Uninstall" button on the module form no longer changes the state of modules, so that cancelling the wizard will not unexpectedly perform the uninstallation. The uninstallation is performed only by clicking on the "Confirm" button on the wizard. Moreover, the wizard provides clearer information about the impact of the uninstallation: what apps/modules will be uninstalled and what documents (models) will be lost. --- addons/mail/wizard/base_module_uninstall.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 addons/mail/wizard/base_module_uninstall.py (limited to 'addons/mail/wizard/base_module_uninstall.py') diff --git a/addons/mail/wizard/base_module_uninstall.py b/addons/mail/wizard/base_module_uninstall.py new file mode 100644 index 00000000000..43e029ba851 --- /dev/null +++ b/addons/mail/wizard/base_module_uninstall.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import models + + +class BaseModuleUninstall(models.TransientModel): + _inherit = "base.module.uninstall" + + def _get_models(self): + # consider mail-thread models only + models = super(BaseModuleUninstall, self)._get_models() + return models.filtered('is_mail_thread') -- cgit v1.2.3