summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-11-29 14:13:01 +0100
committerXavier Morel <xmo@openerp.com>2012-11-29 14:13:01 +0100
commit9f76458404ff3d99824149d09121952c4f2fc775 (patch)
treeb97bc1cdfb5399bd78d0da99c6f558da435219cd /addons/web/static/src
parentbd61641572949ab2c9b1a07267cd7d7344d17a7d (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')
-rw-r--r--addons/web/static/src/js/view_list_editable.js3
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);