Skip to content

Commit 9bb05ad

Browse files
committed
[FIX] web_group_by_percentage: Added exclusion of non-field columns
In some list/tree views, there are non-field columns, for instance buttons to handle an action on a group of lines. Consequently, with this module installed, it's impossible to group lines in certain views, if the grouped view has a button, as using isNumericColumn, which tries to access the column in the view's fields, throws an Exception. As such, we exclude non-field columns from the computation of grouped columns percentages.
1 parent f7de33e commit 9bb05ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_group_by_percentage/static/src/js/backend.esm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ patch(ListRenderer.prototype, "list_group_by_percentage", {
1818

1919
if (list.isGrouped) {
2020
for (var column of columns) {
21-
if (!this.isNumericColumn(column)) continue;
21+
if (column.type != "field" || !this.isNumericColumn(column)) continue;
2222

2323
column.totalSum = 0;
2424
for (var group of list.groups) {

0 commit comments

Comments
 (0)