[FIX] res.groups: when generating initial group view, use admin context and language

This means group category names can be translated in the
default/installation database language.

Closes #3921
This commit is contained in:
Sandy Carter 2014-11-28 13:43:03 -05:00 committed by Olivier Dony
parent f406847613
commit 894143cb4c
1 changed files with 4 additions and 0 deletions

View File

@ -705,6 +705,10 @@ class groups_view(osv.osv):
def update_user_groups_view(self, cr, uid, context=None):
# the view with id 'base.user_groups_view' inherits the user form view,
# and introduces the reified group fields
if not context or context.get('install_mode'):
# use installation/admin language for translatable names in the view
context = dict(context or {})
context.update(self.pool['res.users'].context_get(cr, uid))
view = self.get_user_groups_view(cr, uid, context)
if view:
xml1, xml2 = [], []