Files
odoo_source/addons/mail/wizard/base_module_uninstall.py
T
Raphael Collet b8cf940247 [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.
2017-06-28 15:36:17 +02:00

14 lines
399 B
Python

# -*- 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')