Daily updates from Odoo
Saturday, November 15, 2025
1 change · 17.0
Resolved issues and error corrections
This change corrects an accounting check so it also handles inactive companies properly. It prevents the system from grouping records incorrectly and flagging the wrong accounts when some companies are no longer active.
Original PR description
Checking only the single account.account record per company with account_type = 'equity_unaffected', but read_group was aggregating accounts with a null account.account value when inactive companies…
Checking only the single account.account record per company with account_type = 'equity_unaffected', but read_group was aggregating accounts with a null account.account value when inactive companies were involved.
**PDD output: getting this account assosiate with no comapnny at [this point](https://github.com/odoo/odoo/blob/9b5cea53493eca60f43a8f00707f7470b08ce239/addons/account/models/account_account.py#L35)**
```python
2025-11-15 10:10:12,627 24 [1;32m[1;49mINFO[0m bsra_3274952_19.0 odoo.modules.loading: loading l10n_us_reports/data/check_register.xml
> /home/odoo/src/odoo/18.0/addons/account/models/account_account.py(43)_check_account_type_unique_current_year_earning()
-> raise ValidationError(_('You cannot have more than one account with "Current Year Earnings" as type. (accounts: %s)', [a.code for a in account_unaffected_earnings]))
(Pdb) result
[(res.company(), account.account(94, 259, 347, 413, 481, 949, 1103))]
```
**customer database:**
```sql
bsra_3274952=> select id,name,active from res_company where id in (6,5,7,8,9,12,14);
id | name | active
----+-----------------------------+--------
8 | Credit Suisse _ AI 65-4 | f
14 | Indosuez- AI | f
6 | Credit Suisse _ AI 65-2 GBP | f
7 | Credit Suisse _ AI 65-2 USD | f
12 | Indosuez AI _ USD | f
9 | Indosuez AI _ GBP | f
5 | Vanity Living | f
(7 rows)
bsra_3274952=> select company_id, count(id) from account_account where account_type = 'equity_unaffected' group by company_id;
company_id | count
------------+-------
8 | 1
7 | 1
9 | 1
1 | 1
5 | 1
15 | 1
6 | 1
14 | 1
12 | 1
(9 rows)
```
- OPW: 5256021
- **Tested the solution on other db also:** [UPG-3273039](3273039)
- TBG: https://upgrade.odoo.com/odoo/upgrade.request/3274952/tbg/1309 (more dbs are failing)
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr