[FIX] web: allow to group on more groupable fields with the searchview

Some fields are groupable even though they are not stored (e.g. an inherited
field, by example the 'date' field of 'fleet.vehicle.log.fuel').
This commit is contained in:
qsm-odoo
2017-10-03 10:42:47 +02:00
parent 55925d88b4
commit aba5402d5e
@@ -416,8 +416,8 @@ return Widget.extend({
},
get_groupable_fields: function (fields) {
var groupable_types = ['many2one', 'char', 'boolean', 'selection', 'date', 'datetime'];
var filter_group_field = _.filter(fields, function(field, name) {
if (field.store && _.contains(groupable_types, field.type)) {
var filter_group_field = _.filter(fields, function (field, name) {
if (field.sortable && _.contains(groupable_types, field.type)) {
field.name = name;
return field;
}