[FIX] ir_module: remove unnecessary download function

This error occurs when the name of the module is changed or modified after
being installed.

Steps to reproduce :
1. Install any module.
2. then change the module name.
3. click on module info >  upgrade.
4. Now Apply scheduled Upgrades in the navbar > Confirm.

See the way of error Generating by video:- https://tinyurl.com/2nj2tun4

We changed the name of the base module i.e. 'account_accountant' to
'account_accountant_demo' but this error will also come if the custom module
name has been changed.

commit link of function remove: - https://github.com/odoo/odoo/commit/0339a506f82daa41ccee7b918cb257ba9e8668bd#diff-4f9678d6b87914dc6deca5942262375043388c5ad041b65ce48e0c004e5e0e0bL806-L808

closes odoo/odoo#116265

Sentry: - 3980051773
X-original-commit: 1fa6d9ac2b47e684fc6a6d81632f93b9ffa781a9
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Rémy Voet <ryv@odoo.com>
This commit is contained in:
Sanket Brahmbhatt
2023-03-31 08:50:52 +02:00
parent 47591e463d
commit a0d3d49279
@@ -66,8 +66,6 @@ class BaseModuleUpgrade(models.TransientModel):
if unmet_packages:
raise UserError(_('The following modules are not installed or unknown: %s') % ('\n\n' + '\n'.join(unmet_packages)))
mods.download()
# terminate transaction before re-creating cursor below
self._cr.commit()
odoo.modules.registry.Registry.new(self._cr.dbname, update_module=True)