odoo / o-spreadsheet

Other
193 stars 44 forks source link

[FIX] pivot: Prevent faulty pivot domain to crash #4741

Closed rrahir closed 2 months ago

rrahir commented 2 months ago

The getter getPivotCellFromPosition parses pivot cells domain args but this step assumes that the domain is valid (e.g. refers to a valid groupby,measure combination). Unfortunately, if the domain is invalid, the parsing will crash.

Similarly to the decision made for the getter evaluateFormula[^1] we wrap the parsing in a try/catch statement and in case of faulty evaluation, return the same result as for invalid/non-existing pivots, that is an empty Pivotcell.

[^1]: See https://github.com/odoo/o-spreadsheet/pull/3371

Task: 4088765

Description:

description of this task, what is implemented and why it is implemented that way.

Task: : TASK_ID

review checklist

robodoo commented 2 months ago

Pull request status dashboard