diff options
| author | Xavier-Do <xdo@odoo.com> | 2021-01-14 09:10:09 +0000 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2021-01-14 11:14:23 +0000 |
| commit | fb16a05d4f5025db647996866f2db7fa4248940b (patch) | |
| tree | ce76da1554df7a69af0c891509745a86084b917b /odoo | |
| parent | f15188907a63d3f50c80c8254e60b9f31a666c55 (diff) | |
[FIX] base: do not update module studio_customization
Since odoo/enterprise@937b9214cbe92a6e0c0f14acb6c9bfebf9125a06 module
'studio_customization' has a dependency on module 'web_studio', in order
to automatically remove customizations when uninstalling 'web_studio'.
As a side effect, this marks 'studio_customization' to be upgraded when
'web_studio' is upgraded. An error is logged, but the module stays in
state `to upgrade`, thereby blocking the execution of cron jobs.
The fix simply adds an explicit (though not very elegant) condition on
the module name to filter out module 'studio_customization' when marking
modules in method `button_upgrade`.
A cleaner fix would be to use the `imported` flag, but we don't want to
risk breaking existing features in stable and will be done in master
instead.
Slightly linked to closed #43880
closes odoo/odoo#64534
X-original-commit: 572e05284c1a7587e989acebd43f3c07e7e99fb1
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Diffstat (limited to 'odoo')
| -rw-r--r-- | odoo/addons/base/models/ir_module.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/odoo/addons/base/models/ir_module.py b/odoo/addons/base/models/ir_module.py index 050fa4a978a..b5f79ef5dbe 100644 --- a/odoo/addons/base/models/ir_module.py +++ b/odoo/addons/base/models/ir_module.py @@ -666,7 +666,11 @@ class Module(models.Model): raise UserError(_("Can not upgrade module '%s'. It is not installed.") % (module.name,)) self.check_external_dependencies(module.name, 'to upgrade') for dep in Dependency.search([('name', '=', module.name)]): - if dep.module_id.state == 'installed' and dep.module_id not in todo: + if ( + dep.module_id.state == 'installed' + and dep.module_id not in todo + and dep.module_id.name != 'studio_customization' + ): todo.append(dep.module_id) self.browse(module.id for module in todo).write({'state': 'to upgrade'}) |
