diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 66e89457aeb..1980a9fe074 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -518,7 +518,7 @@
-
+
diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js
index 9fe5426f2cc..a7686f8eebc 100644
--- a/addons/web/static/src/js/view_list.js
+++ b/addons/web/static/src/js/view_list.js
@@ -2182,7 +2182,6 @@ instance.web.list.Column = instance.web.Class.extend({
id: id,
tag: tag
});
-
this.modifiers = attrs.modifiers ? JSON.parse(attrs.modifiers) : {};
delete attrs.modifiers;
_.extend(this, attrs);
@@ -2209,10 +2208,14 @@ instance.web.list.Column = instance.web.Class.extend({
if (this.type !== 'integer' && this.type !== 'float') {
return {};
}
- var aggregation_func = this['group_operator'] || 'sum';
- if (!(aggregation_func in this)) {
+
+ var aggregation_func = (this.sum && 'sum') || (this.avg && 'avg') ||
+ (this.max && 'max') || (this.min && 'min') || this.group_operator;
+
+ if (!aggregation_func) {
return {};
}
+
var C = function (fn, label) {
this['function'] = fn;
this.label = label;