From 48f90bc9c9e2f98e16c198db82872971e4b26ed6 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 3 Nov 2023 15:41:15 +0100 Subject: [PATCH] account: post-install l10n_xx_oca by default, then l10n_xx This commit allows to have a fork of a localisation module in OCA under a different name (adding '_oca' suffix). --- addons/account/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/account/__init__.py b/addons/account/__init__.py index 138004b08496a..07e6475f7605f 100644 --- a/addons/account/__init__.py +++ b/addons/account/__init__.py @@ -45,7 +45,9 @@ def _auto_install_l10n(env): module_list.append('l10n_de_skr03') module_list.append('l10n_de_skr04') else: - if env['ir.module.module'].search([('name', '=', 'l10n_' + country_code.lower())]): + if env['ir.module.module'].search([('name', '=', 'l10n_%s_oca' % country_code.lower())]): + module_list.append('l10n_%s_oca' % country_code.lower()) + elif env['ir.module.module'].search([('name', '=', 'l10n_' + country_code.lower())]): module_list.append('l10n_' + country_code.lower()) else: module_list.append('l10n_generic_coa')