From 0ff6935e2b69211f12a5f691b9b0abb9e1e9919e Mon Sep 17 00:00:00 2001 From: Neri Cervin Date: Wed, 15 Apr 2026 09:46:27 -0300 Subject: [PATCH] =?UTF-8?q?fix(mis=5Fbuilder):=20account.company=5Fid=20?= =?UTF-8?q?=E2=86=92=20company=5Fids=20en=20Odoo=2018?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit En Odoo 18, account.account no tiene company_id sino company_ids (Many2many). Fix para multi_company display de nombres de cuenta. --- mis_builder/models/kpimatrix.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mis_builder/models/kpimatrix.py b/mis_builder/models/kpimatrix.py index dc23b12a7..93351c613 100644 --- a/mis_builder/models/kpimatrix.py +++ b/mis_builder/models/kpimatrix.py @@ -469,7 +469,14 @@ 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}]" + companies = ( + account.company_ids + if hasattr(account, "company_ids") + else account.company_id + ) + names = ", ".join(companies.mapped("name")) + if names: + result = f"{result} [{names}]" return result def get_account_name(self, account_id):