diff options
| author | Xavier Morel <xmo@openerp.com> | 2012-11-29 14:13:01 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2012-11-29 14:13:01 +0100 |
| commit | 9f76458404ff3d99824149d09121952c4f2fc775 (patch) | |
| tree | b97bc1cdfb5399bd78d0da99c6f558da435219cd /addons/web/static/src/js/view_list_editable.js | |
| parent | bd61641572949ab2c9b1a07267cd7d7344d17a7d (diff) | |
[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
Diffstat (limited to 'addons/web/static/src/js/view_list_editable.js')
| -rw-r--r-- | addons/web/static/src/js/view_list_editable.js | 3 |
1 files changed, 2 insertions, 1 deletions
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); |
