diff --git a/frappe/public/js/frappe/ui/group_by/group_by.js b/frappe/public/js/frappe/ui/group_by/group_by.js index 1fd90ca4e3..349a7140d5 100644 --- a/frappe/public/js/frappe/ui/group_by/group_by.js +++ b/frappe/public/js/frappe/ui/group_by/group_by.js @@ -327,6 +327,9 @@ frappe.ui.GroupBy = class { if (this.aggregate_function === "sum") { docfield.label = __("Sum of {0}", [__(docfield.label, null, docfield.parent)]); } else { + if (docfield.fieldtype == "Int") { + docfield.fieldtype = "Float"; // average of ints can be a float + } docfield.label = __("Average of {0}", [__(docfield.label, null, docfield.parent)]); } }