diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-11-12 13:06:48 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-11-12 13:06:48 +0100 |
| commit | 99d0e1b80e5b2d5eb59b96c6ce1bf246f8df2326 (patch) | |
| tree | 6c53282f8a22e9b59d83762ebe057173172c5f63 /odoo/addons/base/wizard/base_module_uninstall.py | |
| parent | 4d53266e236d1816e45b13aa50bcafb1bab2bc8c (diff) | |
| parent | a403155dec769418ede3c9128a887847f97a956f (diff) | |
[MERGE] forward port branch 12.0 up to a403155dec7
Diffstat (limited to 'odoo/addons/base/wizard/base_module_uninstall.py')
| -rw-r--r-- | odoo/addons/base/wizard/base_module_uninstall.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/odoo/addons/base/wizard/base_module_uninstall.py b/odoo/addons/base/wizard/base_module_uninstall.py index ac224dcc82b..a3f53f38c31 100644 --- a/odoo/addons/base/wizard/base_module_uninstall.py +++ b/odoo/addons/base/wizard/base_module_uninstall.py @@ -40,10 +40,12 @@ class BaseModuleUninstall(models.TransientModel): for wizard in self: if wizard.module_id: module_names = set(wizard._get_modules().mapped('name')) - # find the models that have all their XIDs in the given modules + def lost(model): - return all(xid.split('.')[0] in module_names - for xid in ir_models_xids.get(model.id, ())) + xids = ir_models_xids.get(model.id, ()) + return xids and all(xid.split('.')[0] in module_names for xid in xids) + + # find the models that have all their XIDs in the given modules self.model_ids = ir_models.filtered(lost).sorted('name') @api.onchange('module_id') |
