Module
mis_builder
Describe the bug
When a MIS report instance is configured with multiple companies (multi_company=True) and "Expand accounts" is enabled on a KPI, computing the report raises an AttributeError because kpimatrix.py accesses account.company_id on account.account records, but in Odoo 18 that field was replaced by company_ids (Many2many).
To Reproduce
Affected versions: 18.0.1.8.1, Odoo 18.0
Steps to reproduce the behavior:
- Set up a multi-company environment (at least 2 companies with their own chart of accounts).
- Create a MIS report with at least one KPI that has "Auto-expand accounts" enabled.
- Create a MIS report instance that queries multiple companies (i.e. multi_company=True is set internally via query_company_ids).
- Open or compute the report instance.
Expected behavior
The report renders correctly, showing account names with the company name appended in brackets, e.g. 101000 Cash [Company A].
Additional context
In Odoo 18, account.account.company_id (Many2one) was removed and replaced by account.account.company_ids (Many2many) to support accounts shared across multiple companies (see odoo/addons/account/models/account_account.py).
Module
mis_builder
Describe the bug
When a MIS report instance is configured with multiple companies (multi_company=True) and "Expand accounts" is enabled on a KPI, computing the report raises an AttributeError because kpimatrix.py accesses account.company_id on account.account records, but in Odoo 18 that field was replaced by company_ids (Many2many).
To Reproduce
Affected versions: 18.0.1.8.1, Odoo 18.0
Steps to reproduce the behavior:
Expected behavior
The report renders correctly, showing account names with the company name appended in brackets, e.g. 101000 Cash [Company A].
Additional context
In Odoo 18, account.account.company_id (Many2one) was removed and replaced by account.account.company_ids (Many2many) to support accounts shared across multiple companies (see odoo/addons/account/models/account_account.py).