diff options
| author | qdp-odoo <qdp@odoo.com> | 2015-10-27 10:44:36 +0100 |
|---|---|---|
| committer | qdp-odoo <qdp@odoo.com> | 2015-10-27 10:44:50 +0100 |
| commit | ea12117f6579881e6eecbd1df058eb7850f56b84 (patch) | |
| tree | a78743828253c7e5fa9535a9de77502f33d59b82 /addons/account/__init__.py | |
| parent | 6c8a8445852e844c8c0afa42046f3915a893609c (diff) | |
[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
Diffstat (limited to 'addons/account/__init__.py')
| -rw-r--r-- | addons/account/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/addons/account/__init__.py b/addons/account/__init__.py index 1ef28915c64..4c7c83661e2 100644 --- a/addons/account/__init__.py +++ b/addons/account/__init__.py @@ -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') |
