Add company name in the status bar
This commit is contained in:
1 parent
6a32480604
commit
7fbfeaad8a
1 file changed
+7
@@ -67,6 +67,13 @@ class User(OSV):
|
||||
'a child of your main company.', ['company']),
|
||||
]
|
||||
|
||||
def get_status_bar(self, cursor, user_id, ids, name, arg, context=None):
|
||||
res = super(User, self).get_status_bar(cursor, user_id, ids, name, arg,
|
||||
context=context)
|
||||
for user in self.browse(cursor, user_id, ids, context=context):
|
||||
res[user.id] += ' ' + user.company.name
|
||||
return res
|
||||
|
||||
def on_change_main_company(self, cursor, user, ids, vals, context=None):
|
||||
return {'company': vals.get('main_company', False)}
|
||||
|
||||
|
||||
Reference in new issue
Block a user