diff --git a/addons/account/models/chart_template.py b/addons/account/models/chart_template.py index 8013248968e..9c93c4bbec6 100644 --- a/addons/account/models/chart_template.py +++ b/addons/account/models/chart_template.py @@ -164,21 +164,24 @@ class AccountChartTemplate(models.Model): 'chart_template_id': self.id, } - def try_loading_for_current_company(self): + def try_loading(self, company=False): """ Installs this chart of accounts for the current company if not chart of accounts had been created for it yet. """ # do not use `request.env` here, it can cause deadlocks - if request and hasattr(request, 'allowed_company_ids'): - company = self.env['res.company'].browse(request.allowed_company_ids[0]) - else: - company = self.env.company + if not company: + if request and hasattr(request, 'allowed_company_ids'): + company = self.env['res.company'].browse(request.allowed_company_ids[0]) + else: + company = self.env.company # If we don't have any chart of account on this company, install this chart of account if not company.chart_template_id and not self.existing_accounting(company): for template in self: - template.load_for_current_company(15.0, 15.0) + template.with_context(default_company_id=company.id)._load(15.0, 15.0, company) - def load_for_current_company(self, sale_tax_rate, purchase_tax_rate): + try_loading_for_current_company = try_loading + + def _load(self, sale_tax_rate, purchase_tax_rate, company): """ Installs this chart of accounts on the current company, replacing the existing one if it had already one defined. If some accounting entries had already been made, this function fails instead, triggering a UserError. @@ -188,12 +191,8 @@ class AccountChartTemplate(models.Model): """ self.ensure_one() # do not use `request.env` here, it can cause deadlocks - if request and hasattr(request, 'allowed_company_ids'): - company = self.env['res.company'].browse(request.allowed_company_ids[0]) - else: - company = self.env.company # Ensure everything is translated to the company's language, not the user's one. - self = self.with_context(lang=company.partner_id.lang) + self = self.with_context(lang=company.partner_id.lang, company=company) if not self.env.is_admin(): raise AccessError(_("Only administrators can load a charf of accounts")) diff --git a/addons/account/models/res_config_settings.py b/addons/account/models/res_config_settings.py index 35d3c83a1b1..c6b8b09c175 100644 --- a/addons/account/models/res_config_settings.py +++ b/addons/account/models/res_config_settings.py @@ -94,7 +94,7 @@ class ResConfigSettings(models.TransientModel): self.env.ref('base.group_user').write({'implied_ids': [(4, self.env.ref('product.group_sale_pricelist').id)]}) """ install a chart of accounts for the given company (if required) """ if self.chart_template_id and self.chart_template_id != self.company_id.chart_template_id: - self.chart_template_id.load_for_current_company(15.0, 15.0) + self.chart_template_id._load(15.0, 15.0, self.env.company) @api.depends('company_id') def _compute_has_chart_of_accounts(self): diff --git a/addons/account/tests/account_test_savepoint.py b/addons/account/tests/account_test_savepoint.py index 7cea2de366d..a5e0b2f2082 100644 --- a/addons/account/tests/account_test_savepoint.py +++ b/addons/account/tests/account_test_savepoint.py @@ -56,7 +56,7 @@ class AccountingSavepointCase(SavepointCase): cls.env.user.company_id = company chart_template = cls.env['account.chart.template'].browse(chart_template.id) - chart_template.load_for_current_company(15.0, 15.0) + chart_template.try_loading() # The currency could be different after the installation of the chart template. company.write({'currency_id': kwargs.get('currency_id', cls.env.user.company_id.currency_id.id)}) diff --git a/addons/account/tests/test_account_all_l10n.py b/addons/account/tests/test_account_all_l10n.py index 7e916ba60bb..58ac29937d8 100644 --- a/addons/account/tests/test_account_all_l10n.py +++ b/addons/account/tests/test_account_all_l10n.py @@ -48,4 +48,4 @@ class TestAllL10n(SingleTransactionCase): _logger.info(msg) with self.subTest(msg=msg): with self.cr.savepoint(): - coa.try_loading_for_current_company() + coa.try_loading() diff --git a/addons/l10n_ae/data/account_chart_template_data.xml b/addons/l10n_ae/data/account_chart_template_data.xml index 9e6ae93bbcd..bdabb13a9e4 100644 --- a/addons/l10n_ae/data/account_chart_template_data.xml +++ b/addons/l10n_ae/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_ar/data/account_chart_template_data.xml b/addons/l10n_ar/data/account_chart_template_data.xml index 073f46b83f4..fcb48162620 100644 --- a/addons/l10n_ar/data/account_chart_template_data.xml +++ b/addons/l10n_ar/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_at/data/account_chart_template_data.xml b/addons/l10n_at/data/account_chart_template_data.xml index cca117de2c5..0a9c7739c0e 100644 --- a/addons/l10n_at/data/account_chart_template_data.xml +++ b/addons/l10n_at/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_au/data/account_chart_template_configure_data.xml b/addons/l10n_au/data/account_chart_template_configure_data.xml index 12e91eb5d94..e0e45b0c7e9 100644 --- a/addons/l10n_au/data/account_chart_template_configure_data.xml +++ b/addons/l10n_au/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_be/data/account_chart_template_configure_data.xml b/addons/l10n_be/data/account_chart_template_configure_data.xml index 82de3a2f629..9dd509d1ff4 100644 --- a/addons/l10n_be/data/account_chart_template_configure_data.xml +++ b/addons/l10n_be/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_be_edi/tests/test_ubl.py b/addons/l10n_be_edi/tests/test_ubl.py index 37f40aced7c..0fa29858416 100644 --- a/addons/l10n_be_edi/tests/test_ubl.py +++ b/addons/l10n_be_edi/tests/test_ubl.py @@ -10,7 +10,7 @@ class TestUBL(common.TransactionCase): # Force user Belgium country. self.env.user.company_id = self.env['res.company'].create({'name': 'MyCompany'}) self.env.user.company_id.country = self.env.ref('base.be') - self.env.ref('l10n_be.l10nbe_chart_template').load_for_current_company(False, False) + self.env.ref('l10n_be.l10nbe_chart_template').try_loading() self.partner_id = self.env['res.partner'].create({'name': 'TestUser', 'vat': 'BE0123456789'}) def test_ubl_invoice_import(self): diff --git a/addons/l10n_bo/data/account_chart_template_data.xml b/addons/l10n_bo/data/account_chart_template_data.xml index 9eb1fa02c77..7db442fa001 100644 --- a/addons/l10n_bo/data/account_chart_template_data.xml +++ b/addons/l10n_bo/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_br/data/account_tax_template_data.xml b/addons/l10n_br/data/account_tax_template_data.xml index 1038d1f82c1..33e74f2a0f2 100644 --- a/addons/l10n_br/data/account_tax_template_data.xml +++ b/addons/l10n_br/data/account_tax_template_data.xml @@ -3182,7 +3182,7 @@ - + diff --git a/addons/l10n_ca/data/account_chart_template_configure_data.xml b/addons/l10n_ca/data/account_chart_template_configure_data.xml index 91c408dbc51..1f7f726a60a 100644 --- a/addons/l10n_ca/data/account_chart_template_configure_data.xml +++ b/addons/l10n_ca/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_ch/data/account_chart_template_data.xml b/addons/l10n_ch/data/account_chart_template_data.xml index 2fe4f7d7bda..837cc9915e9 100644 --- a/addons/l10n_ch/data/account_chart_template_data.xml +++ b/addons/l10n_ch/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_cl/data/account_chart_template_data.xml b/addons/l10n_cl/data/account_chart_template_data.xml index 26ae9d46de9..8094f1f14bf 100644 --- a/addons/l10n_cl/data/account_chart_template_data.xml +++ b/addons/l10n_cl/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_cn_small_business/data/account_chart_template_data.xml b/addons/l10n_cn_small_business/data/account_chart_template_data.xml index 1d0ab870bd3..87bfa0a6593 100644 --- a/addons/l10n_cn_small_business/data/account_chart_template_data.xml +++ b/addons/l10n_cn_small_business/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_cn_standard/data/account_chart_template_data.xml b/addons/l10n_cn_standard/data/account_chart_template_data.xml index 6ece644774e..47c03074e57 100644 --- a/addons/l10n_cn_standard/data/account_chart_template_data.xml +++ b/addons/l10n_cn_standard/data/account_chart_template_data.xml @@ -12,7 +12,7 @@ - + diff --git a/addons/l10n_co/data/account_chart_template_configure_data.xml b/addons/l10n_co/data/account_chart_template_configure_data.xml index f21b6f76713..cf74e0e9c1f 100644 --- a/addons/l10n_co/data/account_chart_template_configure_data.xml +++ b/addons/l10n_co/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_cr/data/account_chart_template_configure_data.xml b/addons/l10n_cr/data/account_chart_template_configure_data.xml index 6e700000601..638cae32980 100644 --- a/addons/l10n_cr/data/account_chart_template_configure_data.xml +++ b/addons/l10n_cr/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_de/models/chart_template.py b/addons/l10n_de/models/chart_template.py index 22c1b18af74..b62a5c2d313 100644 --- a/addons/l10n_de/models/chart_template.py +++ b/addons/l10n_de/models/chart_template.py @@ -15,9 +15,8 @@ class AccountChartTemplate(models.Model): return res # Write paperformat and report template used on company - def load_for_current_company(self, sale_tax_rate, purchase_tax_rate): - res = super(AccountChartTemplate, self).load_for_current_company(sale_tax_rate, purchase_tax_rate) - company = self.env.company + def _load(self, sale_tax_rate, purchase_tax_rate, company): + res = super(AccountChartTemplate, self)._load(sale_tax_rate, purchase_tax_rate, company) if company.country_id.code == 'DE': company.write({'external_report_layout_id': self.env.ref('l10n_de.external_layout_din5008').id, 'paperformat_id': self.env.ref('l10n_de.paperformat_euro_din').id}) diff --git a/addons/l10n_de_skr03/data/account_chart_template_data.xml b/addons/l10n_de_skr03/data/account_chart_template_data.xml index f4eac748632..f0455a1e85d 100644 --- a/addons/l10n_de_skr03/data/account_chart_template_data.xml +++ b/addons/l10n_de_skr03/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_de_skr04/data/account_chart_template_data.xml b/addons/l10n_de_skr04/data/account_chart_template_data.xml index df61b216706..072b66a8bba 100644 --- a/addons/l10n_de_skr04/data/account_chart_template_data.xml +++ b/addons/l10n_de_skr04/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_do/data/account_chart_template_configure_data.xml b/addons/l10n_do/data/account_chart_template_configure_data.xml index 616cf27efaf..a7671ce1e70 100644 --- a/addons/l10n_do/data/account_chart_template_configure_data.xml +++ b/addons/l10n_do/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_ec/data/account_chart_template_data.xml b/addons/l10n_ec/data/account_chart_template_data.xml index bacf0d13b91..ce15e3baa2e 100644 --- a/addons/l10n_ec/data/account_chart_template_data.xml +++ b/addons/l10n_ec/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_es/data/account_chart_template_configure_data.xml b/addons/l10n_es/data/account_chart_template_configure_data.xml index 8d7178f898b..dd409269cb8 100644 --- a/addons/l10n_es/data/account_chart_template_configure_data.xml +++ b/addons/l10n_es/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_et/data/account_chart_template_configure_data.xml b/addons/l10n_et/data/account_chart_template_configure_data.xml index d677832c106..9e9f702c5d0 100644 --- a/addons/l10n_et/data/account_chart_template_configure_data.xml +++ b/addons/l10n_et/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_fr/data/account_chart_template_configure_data.xml b/addons/l10n_fr/data/account_chart_template_configure_data.xml index f69b141c297..a96b3e05d63 100644 --- a/addons/l10n_fr/data/account_chart_template_configure_data.xml +++ b/addons/l10n_fr/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_generic_coa/data/account_chart_template_data.xml b/addons/l10n_generic_coa/data/account_chart_template_data.xml index 0994cd3932e..c3309d46735 100644 --- a/addons/l10n_generic_coa/data/account_chart_template_data.xml +++ b/addons/l10n_generic_coa/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_gr/data/account_chart_template_configure_data.xml b/addons/l10n_gr/data/account_chart_template_configure_data.xml index acedd6449e0..2084c0fdd33 100644 --- a/addons/l10n_gr/data/account_chart_template_configure_data.xml +++ b/addons/l10n_gr/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_gt/data/account_chart_template_data.xml b/addons/l10n_gt/data/account_chart_template_data.xml index 37d5540256a..7ca7eed66cb 100644 --- a/addons/l10n_gt/data/account_chart_template_data.xml +++ b/addons/l10n_gt/data/account_chart_template_data.xml @@ -72,7 +72,7 @@ ]"/> - + diff --git a/addons/l10n_hk/data/account_chart_template_configure_data.xml b/addons/l10n_hk/data/account_chart_template_configure_data.xml index b42fde69af0..f6f61f2037e 100644 --- a/addons/l10n_hk/data/account_chart_template_configure_data.xml +++ b/addons/l10n_hk/data/account_chart_template_configure_data.xml @@ -1,6 +1,6 @@ - + diff --git a/addons/l10n_hn/data/account_chart_template_data.xml b/addons/l10n_hn/data/account_chart_template_data.xml index bfeafbd48dd..f0f99df704b 100644 --- a/addons/l10n_hn/data/account_chart_template_data.xml +++ b/addons/l10n_hn/data/account_chart_template_data.xml @@ -72,7 +72,7 @@ ]"/> - + diff --git a/addons/l10n_hr/data/account_chart_template_data.xml b/addons/l10n_hr/data/account_chart_template_data.xml index 1072bc86a25..0677e042ffb 100644 --- a/addons/l10n_hr/data/account_chart_template_data.xml +++ b/addons/l10n_hr/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_hu/data/account_chart_template_configure_data.xml b/addons/l10n_hu/data/account_chart_template_configure_data.xml index 2ac5a1aa651..07c8ba83ba1 100644 --- a/addons/l10n_hu/data/account_chart_template_configure_data.xml +++ b/addons/l10n_hu/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_ie/data/account_chart_template_configuration_data.xml b/addons/l10n_ie/data/account_chart_template_configuration_data.xml index 3a690fc2612..f354fff9a51 100644 --- a/addons/l10n_ie/data/account_chart_template_configuration_data.xml +++ b/addons/l10n_ie/data/account_chart_template_configuration_data.xml @@ -1,6 +1,6 @@ - + diff --git a/addons/l10n_in/data/account_chart_template_data.xml b/addons/l10n_in/data/account_chart_template_data.xml index b7bfb77d415..5a035de6ac5 100644 --- a/addons/l10n_in/data/account_chart_template_data.xml +++ b/addons/l10n_in/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_it/data/account_chart_template_data.xml b/addons/l10n_it/data/account_chart_template_data.xml index 0431a234651..fc829522923 100644 --- a/addons/l10n_it/data/account_chart_template_data.xml +++ b/addons/l10n_it/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_jp/data/account_chart_template_configure_data.xml b/addons/l10n_jp/data/account_chart_template_configure_data.xml index c643e12f4a3..2bad92eda93 100644 --- a/addons/l10n_jp/data/account_chart_template_configure_data.xml +++ b/addons/l10n_jp/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_lu/data/account_chart_template_data.xml b/addons/l10n_lu/data/account_chart_template_data.xml index 19a25539e32..cccc1bbb267 100644 --- a/addons/l10n_lu/data/account_chart_template_data.xml +++ b/addons/l10n_lu/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_ma/data/account_chart_template_data.xml b/addons/l10n_ma/data/account_chart_template_data.xml index c3ef488c34d..3865913ff55 100644 --- a/addons/l10n_ma/data/account_chart_template_data.xml +++ b/addons/l10n_ma/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_mn/data/account_chart_template_configuration_data.xml b/addons/l10n_mn/data/account_chart_template_configuration_data.xml index 2de735fa360..35d6a4de952 100644 --- a/addons/l10n_mn/data/account_chart_template_configuration_data.xml +++ b/addons/l10n_mn/data/account_chart_template_configuration_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_mx/data/account_chart_template_data.xml b/addons/l10n_mx/data/account_chart_template_data.xml index 8fa6c909bdf..b6ec19f3117 100644 --- a/addons/l10n_mx/data/account_chart_template_data.xml +++ b/addons/l10n_mx/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_nl/data/account_chart_template_data.xml b/addons/l10n_nl/data/account_chart_template_data.xml index 4b6e5e54d1c..2c70d1f26df 100644 --- a/addons/l10n_nl/data/account_chart_template_data.xml +++ b/addons/l10n_nl/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_nl/models/account_chart_template.py b/addons/l10n_nl/models/account_chart_template.py index 17c494c0481..bd196fdbc0d 100644 --- a/addons/l10n_nl/models/account_chart_template.py +++ b/addons/l10n_nl/models/account_chart_template.py @@ -6,10 +6,10 @@ from odoo import api, fields, models, _ class AccountChartTemplate(models.Model): _inherit = 'account.chart.template' - def load_for_current_company(self, sale_tax_rate, purchase_tax_rate): + def _load(self, sale_tax_rate, purchase_tax_rate, company): # Add tag to 999999 account - res = super(AccountChartTemplate, self).load_for_current_company(sale_tax_rate, purchase_tax_rate) - if self.env.company.country_id.code == 'NL': + res = super(AccountChartTemplate, self)._load(sale_tax_rate, purchase_tax_rate, company) + if company.country_id.code == 'NL': account = self.env['account.account'].search([('code', '=', '999999'), ('company_id', '=', self.env.company.id)]) if account: account.tag_ids = [(4, self.env.ref('l10n_nl.account_tag_12').id)] diff --git a/addons/l10n_no/data/account_chart_template_data.xml b/addons/l10n_no/data/account_chart_template_data.xml index 79e27620a9e..3297a6725b3 100644 --- a/addons/l10n_no/data/account_chart_template_data.xml +++ b/addons/l10n_no/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_nz/data/account_chart_template_configure_data.xml b/addons/l10n_nz/data/account_chart_template_configure_data.xml index 1375f755cef..f54ef641dc2 100644 --- a/addons/l10n_nz/data/account_chart_template_configure_data.xml +++ b/addons/l10n_nz/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_pa/data/account_chart_template_data.xml b/addons/l10n_pa/data/account_chart_template_data.xml index 93944567508..e32e919d29d 100644 --- a/addons/l10n_pa/data/account_chart_template_data.xml +++ b/addons/l10n_pa/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_pe/data/account_chart_template_data.xml b/addons/l10n_pe/data/account_chart_template_data.xml index 6a52638c45f..b25c6f52494 100644 --- a/addons/l10n_pe/data/account_chart_template_data.xml +++ b/addons/l10n_pe/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_pl/data/account_chart_template_data.xml b/addons/l10n_pl/data/account_chart_template_data.xml index d4ac336b746..524733982d0 100644 --- a/addons/l10n_pl/data/account_chart_template_data.xml +++ b/addons/l10n_pl/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_pt/data/account_chart_template_configure_data.xml b/addons/l10n_pt/data/account_chart_template_configure_data.xml index 67ccb9ab292..a238410ca58 100644 --- a/addons/l10n_pt/data/account_chart_template_configure_data.xml +++ b/addons/l10n_pt/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_ro/data/account_chart_template_data.xml b/addons/l10n_ro/data/account_chart_template_data.xml index 7f22e01478f..8a48ab0931b 100644 --- a/addons/l10n_ro/data/account_chart_template_data.xml +++ b/addons/l10n_ro/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_sa/data/account_chart_template_configure_data.xml b/addons/l10n_sa/data/account_chart_template_configure_data.xml index 44d29a81b00..db97c58fc0b 100644 --- a/addons/l10n_sa/data/account_chart_template_configure_data.xml +++ b/addons/l10n_sa/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_sg/data/account_chart_template_data.xml b/addons/l10n_sg/data/account_chart_template_data.xml index 8c7abb168cf..9fff6f40e3c 100644 --- a/addons/l10n_sg/data/account_chart_template_data.xml +++ b/addons/l10n_sg/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_si/data/account_chart_template_data.xml b/addons/l10n_si/data/account_chart_template_data.xml index 3e88279c49a..fefd11b2909 100644 --- a/addons/l10n_si/data/account_chart_template_data.xml +++ b/addons/l10n_si/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_syscohada/data/account_chart_template_data.xml b/addons/l10n_syscohada/data/account_chart_template_data.xml index 8b945630cb3..585021d0b5a 100644 --- a/addons/l10n_syscohada/data/account_chart_template_data.xml +++ b/addons/l10n_syscohada/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_th/data/account_chart_template_data.xml b/addons/l10n_th/data/account_chart_template_data.xml index e6dc6ce6b85..942a9fffe1f 100644 --- a/addons/l10n_th/data/account_chart_template_data.xml +++ b/addons/l10n_th/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_tr/data/account_chart_template_data.xml b/addons/l10n_tr/data/account_chart_template_data.xml index b80a32f0229..1815ac4e4b7 100644 --- a/addons/l10n_tr/data/account_chart_template_data.xml +++ b/addons/l10n_tr/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_ua/data/account_chart_template_config.xml b/addons/l10n_ua/data/account_chart_template_config.xml index f4a9dbfb06a..bd08adc8855 100644 --- a/addons/l10n_ua/data/account_chart_template_config.xml +++ b/addons/l10n_ua/data/account_chart_template_config.xml @@ -31,7 +31,7 @@ - + diff --git a/addons/l10n_uk/data/account_chart_template_data.xml b/addons/l10n_uk/data/account_chart_template_data.xml index 6eee7a3712a..6ad3b918e71 100644 --- a/addons/l10n_uk/data/account_chart_template_data.xml +++ b/addons/l10n_uk/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_uy/data/account_chart_template_data.xml b/addons/l10n_uy/data/account_chart_template_data.xml index 4e1c02a6474..9034bbd8669 100644 --- a/addons/l10n_uy/data/account_chart_template_data.xml +++ b/addons/l10n_uy/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_ve/data/account_chart_template_data.xml b/addons/l10n_ve/data/account_chart_template_data.xml index 254f59a66b3..6d63e187e2b 100644 --- a/addons/l10n_ve/data/account_chart_template_data.xml +++ b/addons/l10n_ve/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_vn/data/account_chart_template_data.xml b/addons/l10n_vn/data/account_chart_template_data.xml index 1f6bfea02da..85a9bf1bd84 100644 --- a/addons/l10n_vn/data/account_chart_template_data.xml +++ b/addons/l10n_vn/data/account_chart_template_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/l10n_za/data/account_chart_template_configure_data.xml b/addons/l10n_za/data/account_chart_template_configure_data.xml index 6a3db99a6d5..b4579c80195 100644 --- a/addons/l10n_za/data/account_chart_template_configure_data.xml +++ b/addons/l10n_za/data/account_chart_template_configure_data.xml @@ -1,7 +1,7 @@ - + diff --git a/addons/purchase/tests/test_purchase_order_report.py b/addons/purchase/tests/test_purchase_order_report.py index b78a83d9829..f2110c96124 100644 --- a/addons/purchase/tests/test_purchase_order_report.py +++ b/addons/purchase/tests/test_purchase_order_report.py @@ -18,7 +18,7 @@ class TestPurchaseOrderReport(common.TransactionCase): # Create a new company and set CoA self.company_id = self.env['res.company'].create({'name': 'new_company'}) self.env.user.company_id = self.company_id - self.env.ref('l10n_generic_coa.configurable_chart_template').load_for_current_company(False, False) + self.env.ref('l10n_generic_coa.configurable_chart_template').try_loading() def test_00_purchase_order_report(self): uom_dozen = self.env.ref('uom.product_uom_dozen')