forked from Techsystech/web
[FIX] web_pivot_computed_measure : do not raise Javascript error in case of no data
Update web_pivot_computed_measure/static/src/js/pivot_model.js Co-authored-by: Alexandre Díaz <alexandre.diaz@tecnativa.com>12.0
parent
27aa521220
commit
857bd84424
|
@ -127,7 +127,11 @@ odoo.define('web_pivot_computed_measure.PivotModel', function (require) {
|
|||
resData, resComparison),
|
||||
};
|
||||
} else {
|
||||
dataPoint[cm.id] = py.eval(cm.operation, dataPoint);
|
||||
if (dataPoint.__count === 0) {
|
||||
dataPoint[cm.id] = false;
|
||||
} else {
|
||||
dataPoint[cm.id] = py.eval(cm.operation, dataPoint);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue