Skip to content
Snippets Groups Projects
Commit 97ffc518 authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] account: do not call `button_install` is not necessary


If the method `_auto_install_l10n` is called programmatically on a DB
where the localization has already been installed, useless processing is
performed by `button_install`.

Do not call this method if no module need to be installed.

closes odoo/odoo#106407

X-original-commit: 11e9d3f1
Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent 455c7e77
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,8 @@ def _auto_install_l10n(env):
module_list.append('base_vat')
module_ids = env['ir.module.module'].search([('name', 'in', module_list), ('state', '=', 'uninstalled')])
module_ids.sudo().button_install()
if module_ids:
module_ids.sudo().button_install()
def _account_post_init(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment