[FIX]document : Display webdav folder names in user s language instead of only English
bzr revid: mma@tinyerp.com-20121101113434-00waekqwlteufser
This commit is contained in:
parent
b006809773
commit
c91ff5bbaa
|
@ -823,6 +823,7 @@ class node_res_dir(node_class):
|
|||
uid = self.context.uid
|
||||
ctx = self.context.context.copy()
|
||||
ctx.update(self.dctx)
|
||||
ctx.update(self.context.extra_ctx)
|
||||
where = []
|
||||
if self.domain:
|
||||
app = safe_eval(self.domain, ctx)
|
||||
|
|
|
@ -51,9 +51,10 @@ class document_davdir(osv.osv):
|
|||
# that might be not worth preparing.
|
||||
nctx.extra_ctx['webdav_path'] = '/'+config.get_misc('webdav','vdir','webdav')
|
||||
usr_obj = self.pool.get('res.users')
|
||||
res = usr_obj.read(cr, uid, uid, ['login'])
|
||||
res = usr_obj.read(cr, uid, uid, ['login','context_lang'])
|
||||
if res:
|
||||
nctx.extra_ctx['username'] = res['login']
|
||||
nctx.extra_ctx['lang'] = res['context_lang']
|
||||
# TODO group
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in New Issue