[FIX] incorrect handling of saved filter group_by when not present or an array

bzr revid: xmo@openerp.com-20120221140517-fs0axg9w8irapw06
This commit is contained in:
Xavier Morel 2012-02-21 15:05:17 +01:00
parent 3fe255dbfd
commit fbf4c6dc0f
1 changed files with 8 additions and 3 deletions

View File

@ -263,9 +263,14 @@ openerp.web.SearchView = openerp.web.OldWidget.extend(/** @lends openerp.web.Sea
var filter = this.managed_filters[val];
this.do_clear(false).then(_.bind(function() {
select.val('get:' + val);
var groupbys = _.map(filter.context.group_by.split(","), function(el) {
return {"group_by": el};
});
var groupbys = [];
var group_by = filter.context.group_by;
if (group_by) {
groupbys = _.map(
group_by instanceof Array ? group_by : group_by.split(','),
function (el) { return { group_by: el }; });
}
this.on_search([filter.domain], [filter.context], groupbys);
}, this));
} else {