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
This commit is contained in:
Cédric Krier committed 2020-08-03 00:01:42 +02:00
1 parent bd50903047
commit eabe0aec66
1 file changed
+1 -1
+1 -1
View File
@@ -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