Merge lp:~savoirfairelinux-openerp/ocb-web/1279885 into lp:ocb-web

Status: Merged
Approved by: Guewen Baconnier @ Camptocamp
Approved revision: 4144
Merged at revision: 4156
Proposed branch: lp:~savoirfairelinux-openerp/ocb-web/1279885
Merge into: lp:ocb-web
Diff against target: 12 lines (+1/-1)
1 file modified
addons/web/static/src/js/view_list.js (+1/-1)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/ocb-web/1279885
Reviewer Review Type Date Requested Status
Yannick Vaucher @ Camptocamp code review, no tests Approve
Holger Brunn (Therp) code review Approve
Review via email: mp+206233@code.launchpad.net

Description of the change

Adds context propagation to m2m fields in list views.
Fixes translation issues when viewing a a many2many field in a Tree view.
see https://bugs.launchpad.net/openerp-web/+bug/1279885

To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

I took the liberty to link your branch with the bug report you mentioned.

review: Approve (code review)
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

LGTM

review: Approve (code review, no tests)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/view_list.js'
2--- addons/web/static/src/js/view_list.js 2014-01-15 11:00:38 +0000
3+++ addons/web/static/src/js/view_list.js 2014-02-13 17:05:03 +0000
4@@ -1060,7 +1060,7 @@
5 ids = value;
6 }
7 new instance.web.Model(column.relation)
8- .call('name_get', [ids]).done(function (names) {
9+ .call('name_get', [ids, this.dataset.context]).done(function (names) {
10 // FIXME: nth horrible hack in this poor listview
11 record.set(column.id + '__display',
12 _(names).pluck(1).join(', '));