From 9f76458404ff3d99824149d09121952c4f2fc775 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 29 Nov 2012 14:13:01 +0100 Subject: [PATCH] [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 --- addons/web/static/src/js/view_list_editable.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index 7fe6a8ec42b..79b91a41b3c 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -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);