[IMP] account: auto-install 'l10n_uk' for country code 'GB'. Auto install 'l10n_generic_coa' if there is no dedicated localization found for the country code

This commit is contained in:
qdp-odoo
2015-10-27 10:44:50 +01:00
parent 6c8a844585
commit ea12117f65
+6 -1
View File
@@ -16,8 +16,13 @@ def _auto_install_l10n(cr, registry):
if country_code in ['BJ', 'BF', 'CM', 'CF', 'KM', 'CG', 'CI', 'GA', 'GN', 'GW', 'GQ', 'ML', 'NE', 'CD', 'SN', 'TD', 'TG']:
#countries using OHADA Chart of Accounts
module_list.append('l10n_syscohada')
elif country_code == 'GB':
module_list.append('l10n_uk')
else:
module_list.append('l10n_' + country_code.lower())
if registry['ir.module.module'].search(cr, SUPERUSER_ID, [('name', '=', 'l10n_' + country_code.lower())]):
module_list.append('l10n_' + country_code.lower())
else:
module_list.append('l10n_generic_coa')
if country_code == 'US':
module_list.append('account_plaid')
module_list.append('account_check_printing')