Merge lp:~openerp-dev/openobject-addons/trunk-opw-576776-port-mma into lp:openobject-addons

Proposed by Mayur Maheshwari(OpenERP)
Status: Merged
Merged at revision: 8001
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-opw-576776-port-mma
Merge into: lp:openobject-addons
Diff against target: 26 lines (+3/-1)
2 files modified
document/nodes.py (+1/-0)
document_webdav/document_webdav.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-opw-576776-port-mma
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+132532@code.launchpad.net

Description of the change

Hello,

The webdav connection doesn’t read the default language of the user who is logged in. It always shows the names in English. That's wrong.

For example:
1. Set language as Dutch for the user.
2. Connect with webdav by giving path dav://hostname:port/webdav with Dutch user and open the database folder.
3. Go to Documents/Products which shows the product names in English which should be in Dutch(user's language).

This fixes the issue.
Code is forward port from 6.1

Thanks
Mayur

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'document/nodes.py'
2--- document/nodes.py 2012-10-25 13:09:30 +0000
3+++ document/nodes.py 2012-11-01 12:09:21 +0000
4@@ -823,6 +823,7 @@
5 uid = self.context.uid
6 ctx = self.context.context.copy()
7 ctx.update(self.dctx)
8+ ctx.update(self.context.extra_ctx)
9 where = []
10 if self.domain:
11 app = safe_eval(self.domain, ctx)
12
13=== modified file 'document_webdav/document_webdav.py'
14--- document_webdav/document_webdav.py 2012-10-02 10:29:15 +0000
15+++ document_webdav/document_webdav.py 2012-11-01 12:09:21 +0000
16@@ -51,9 +51,10 @@
17 # that might be not worth preparing.
18 nctx.extra_ctx['webdav_path'] = '/'+config.get_misc('webdav','vdir','webdav')
19 usr_obj = self.pool.get('res.users')
20- res = usr_obj.read(cr, uid, uid, ['login'])
21+ res = usr_obj.read(cr, uid, uid, ['login','context_lang'])
22 if res:
23 nctx.extra_ctx['username'] = res['login']
24+ nctx.extra_ctx['lang'] = res['context_lang']
25 # TODO group
26 return
27

Subscribers

People subscribed via source and target branches

to all changes: