diff --git a/mis_builder/models/kpimatrix.py b/mis_builder/models/kpimatrix.py index dc23b12a7..f34385de1 100644 --- a/mis_builder/models/kpimatrix.py +++ b/mis_builder/models/kpimatrix.py @@ -469,7 +469,7 @@ def _load_account_names(self): def _get_account_name(self, account): result = f"{account.code} {account.name}" if self._multi_company: - result = f"{result} [{account.company_id.name}]" + result = f"{result} [{account.company_ids[0].name}]" return result def get_account_name(self, account_id): diff --git a/mis_builder/tests/test_mis_report_instance.py b/mis_builder/tests/test_mis_report_instance.py index 7177e65dd..b0c2ed861 100644 --- a/mis_builder/tests/test_mis_report_instance.py +++ b/mis_builder/tests/test_mis_report_instance.py @@ -383,7 +383,7 @@ def test_multi_company_compute(self): account = self.env["account.account"].browse(row.account_id) self.assertEqual( row.label, - f"{account.code} {account.name} [{account.company_id.name}]", + f"{account.code} {account.name} [{account.company_ids[0].name}]", ) self.report_instance.write({"multi_company": False}) matrix = self.report_instance._compute_matrix()