From fdf2f0c09511e37d26fe371bf4861f7d7fa0dca7 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 16 Dec 2022 15:41:02 +0000 Subject: [PATCH] [FIX] l10n_*: missing load_translations in manifest post_init_hook There is a code pattern in l10n modules to create a post init hook method `load_translations` in `__init__.py` and to add it in the `post_init_hook` of the module manifest. For the modules part of this revision, the method `load_translations` was created as expected, but then was missing in the `post_init_hook` key of the manifest, therefore leading to the fact this `load_translations` method was never called for these modules, despite their `spoken_languages` were correctly set in their charf of account template. closes odoo/odoo#108254 Related: odoo/design-themes#631 Related: odoo/enterprise#35084 Related: odoo/upgrade#4144 Signed-off-by: Christophe Simonis --- addons/l10n_hr/__init__.py | 2 +- addons/l10n_hr/__manifest__.py | 1 + addons/l10n_it/__manifest__.py | 1 + addons/l10n_pe/__manifest__.py | 1 + addons/l10n_ro/__manifest__.py | 1 + addons/l10n_rs/__manifest__.py | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/l10n_hr/__init__.py b/addons/l10n_hr/__init__.py index 246cd8c921f..c7275ea9046 100644 --- a/addons/l10n_hr/__init__.py +++ b/addons/l10n_hr/__init__.py @@ -2,4 +2,4 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. def load_translations(env): - env.ref('l10n_hr.l10n_hr_chart_template').process_coa_translations() + env.ref('l10n_hr.l10n_hr_euro_chart_template').process_coa_translations() diff --git a/addons/l10n_hr/__manifest__.py b/addons/l10n_hr/__manifest__.py index 1a1f6fe111a..e611d88f3e1 100644 --- a/addons/l10n_hr/__manifest__.py +++ b/addons/l10n_hr/__manifest__.py @@ -33,5 +33,6 @@ 'demo': [ 'demo/demo_company.xml', ], + 'post_init_hook': 'load_translations', 'license': 'LGPL-3', } diff --git a/addons/l10n_it/__manifest__.py b/addons/l10n_it/__manifest__.py index 02939d1bd7b..05b981feaaa 100644 --- a/addons/l10n_it/__manifest__.py +++ b/addons/l10n_it/__manifest__.py @@ -36,4 +36,5 @@ Italian accounting chart and localization. 'demo/demo_company.xml', ], 'license': 'LGPL-3', + 'post_init_hook': 'load_translations', } diff --git a/addons/l10n_pe/__manifest__.py b/addons/l10n_pe/__manifest__.py index 650d34b49ea..9c183557e26 100644 --- a/addons/l10n_pe/__manifest__.py +++ b/addons/l10n_pe/__manifest__.py @@ -36,4 +36,5 @@ 'demo/demo_company.xml', 'demo/demo_partner.xml', ], + 'post_init_hook': 'load_translations', } diff --git a/addons/l10n_ro/__manifest__.py b/addons/l10n_ro/__manifest__.py index 8ab39ba2f12..e22c485fdd9 100644 --- a/addons/l10n_ro/__manifest__.py +++ b/addons/l10n_ro/__manifest__.py @@ -41,5 +41,6 @@ Romanian accounting chart and localization. 'demo': [ 'demo/demo_company.xml', ], + 'post_init_hook': 'load_translations', 'license': 'LGPL-3', } diff --git a/addons/l10n_rs/__manifest__.py b/addons/l10n_rs/__manifest__.py index 713608f2313..3554a29268a 100644 --- a/addons/l10n_rs/__manifest__.py +++ b/addons/l10n_rs/__manifest__.py @@ -27,5 +27,6 @@ "views/report_invoice.xml", ], "demo": ["demo/demo_company.xml"], + 'post_init_hook': 'load_translations', "license": "LGPL-3", }