mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[FIX] web_pivot_computed_measure: Use js eval to avoid different types operation error
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import {PivotModel} from "@web/views/pivot/pivot_model";
|
||||
import {patch} from "web.utils";
|
||||
import {computeReportMeasures} from "@web/views/helpers/utils";
|
||||
import {evalOperation} from "../helpers/utils.esm";
|
||||
|
||||
patch(PivotModel.prototype, "web_pivot_computed_measure.PivotModel", {
|
||||
/**
|
||||
@@ -148,7 +149,7 @@ patch(PivotModel.prototype, "web_pivot_computed_measure.PivotModel", {
|
||||
subGroupData[cm.id] = false;
|
||||
} else {
|
||||
// eslint-disable-next-line no-undef
|
||||
subGroupData[cm.id] = py.eval(cm.operation, subGroupData);
|
||||
subGroupData[cm.id] = evalOperation(cm.operation, subGroupData);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user