[FIX] groupby on editable list

Because of the "meta" columns (e.g. group name column),
ListView#columns would end up with a different number of elements than
ListView#fields_view.arch.children, and when zipping them together (to
build the form view for edition) things wouldn't match anymore.

It would seem simply filtering out meta columns (and only keep those
actually specified by the view) is sufficient to fix the issue and
have everything line up again. I'm midly impressed.

bzr revid: xmo@openerp.com-20121129131301-scc38i4l55ea7lis
This commit is contained in:
Xavier Morel 2012-11-29 14:13:01 +01:00
parent bd61641572
commit 9f76458404
1 changed files with 2 additions and 1 deletions

View File

@ -383,7 +383,8 @@ openerp.web.list_editable = function (instance) {
version: '7.0'
});
_(view.arch.children).chain()
.zip(this.columns)
.zip(_(this.columns).filter(function (c) {
return !(c instanceof instance.web.list.MetaColumn);}))
.each(function (ar) {
var widget = ar[0], column = ar[1];
var modifiers = _.extend({}, column.modifiers);