changeset a215c2f85492 in modules/company:5.6
details: https://hg.tryton.org/modules/company?cmd=changeset;node=a215c2f85492
description:
        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
        (grafted from 556674c5b0753114a1ab7f377103f724e2b05f98)
diffstat:

 res.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 6c9b898fb51a -r a215c2f85492 res.py
--- a/res.py    Mon May 04 12:16:07 2020 +0200
+++ b/res.py    Mon Aug 03 00:01:42 2020 +0200
@@ -84,7 +84,7 @@
                 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

Reply via email to