From eabe0aec663019beb94ea5eb974fd0ce11ab8234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 3 Aug 2020 00:01:42 +0200 Subject: [PATCH] Display company in status when main company has children As soon as the main company has children, we must notice the user on which one he is. The companies field contain only the children of the current company. issue9403 review311921002 --- res.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res.py b/res.py index eb10ca4631..73d554e206 100644 --- a/res.py +++ b/res.py @@ -82,7 +82,7 @@ class User(metaclass=PoolMeta): and len(list(filter(same_company, self.employees))) > 1): status += ' - %s' % self.employee.rec_name if self.company: - if len(self.companies) > 1: + if self.main_company.childs: status += ' - %s' % self.company.rec_name status += ' [%s]' % self.company.currency.code return status