Thursday, August 22, 2024
1 change · saas-17.1
Resolved issues and error corrections
This fix ensures accounting localization packages are installed automatically for several countries when Accounting is set up. It also prevents an error when selecting a fiscal localization, helping companies complete accounting configuration without interruption.
Original PR description
**Steps to reproduce:** - Create an empty db - Go to the configuration of the company - Set the country of the company to Bangladesh - Install Accounting **1st issue:** The localization module (i.e.…
**Steps to reproduce:**
- Create an empty db
- Go to the configuration of the company
- Set the country of the company to Bangladesh
- Install Accounting
**1st issue:**
The localization module (i.e. l10n_bd) has not been installed.
[Same issue with:
l10n_bd, l10n_bf, l10n_bj, l10n_cd, l10n_cf, l10n_cg, l10n_ci, l10n_cm, l10n_cy, l10n_ga, l10n_gn, l10n_gq, l10n_gw, l10n_km, l10n_ml, l10n_mt, l10n_ne, l10n_rw, l10n_sn, l10n_td, l10n_tg, l10n_ug]
- Go to Accounting settings
- Select "Bangladesh" as Fiscal Localization
- Save the settings
**2nd issue:**
A KeyError is raised:
File "/home/odoo/src/17_1/odoo/odoo/fields.py", line 1362, in compute_value
fields = records.pool.field_computed[self]
KeyError: 'account.asset.currency_id'
**Cause:**
**1st issue:**
"auto_install" is not present in the manifest file.
**2nd issue:**
When loading the chart template in "_load" method, "pool" attribute of "company" and "self" is not the same after the creation of a new registry. And [company = company.with_env(self.env)] does not update company.pool Therefore, when executing [self._pre_reload_data(company, template_data, data)], "self" and "company" are not on the same registry.
**Solution:**
**1st issue:**
Add 'auto_install': ['account'] in the manifest as it is done in others localization modules.
**2nd issue:**
Browse the company instead of using "with_env(self.env)" to update "company.pool".
opw-4119423
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr