Do not show data in user status if unique
issue8994 review256411002
This commit is contained in:
1 parent
0d5875ee00
commit
2908b8beff
2 files changed
+10
-2
No files matched your search
@@ -1,3 +1,5 @@
|
||||
* Do not show company in user status if unique
|
||||
* Show employee in user status if not unique
|
||||
* Add supervisor and subordinates of employee
|
||||
* Add employee to rule context
|
||||
* Add company and employee administrator group
|
||||
|
||||
@@ -77,10 +77,16 @@ class User(metaclass=PoolMeta):
|
||||
return companies
|
||||
|
||||
def get_status_bar(self, name):
|
||||
def same_company(record):
|
||||
return record.company == self.company
|
||||
status = super(User, self).get_status_bar(name)
|
||||
if (self.employee
|
||||
and len(list(filter(same_company, self.employees))) > 1):
|
||||
status += ' - %s' % self.employee.rec_name
|
||||
if self.company:
|
||||
status += ' - %s [%s]' % (self.company.rec_name,
|
||||
self.company.currency.name)
|
||||
if len(self.companies) > 1:
|
||||
status += ' - %s' % self.company.rec_name
|
||||
status += ' [%s]' % self.company.currency.code
|
||||
return status
|
||||
|
||||
@fields.depends('main_company')
|
||||
|
||||
Reference in new issue
Block a user