[MERGE] webdav translations

bzr revid: fp@tinyerp.com-20121112085238-2n6ogv6wjt9mdqu6
This commit is contained in:
Fabien Pinckaers 2012-11-12 09:52:38 +01:00
commit f0f6b0047b
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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