odoo/o-spreadsheet#8740

Created by fw-bot
Merged at 403cbb57d0f64e6d9804425bd2e00f79d34ee09c

Statuses:

label
odoo:saas-18.4-18.0-fix-unused-pivot-adrm-527383-fw
head
539b4a5b1c16b68c4ce63645814e6fe1082fdfc0
merged
5 days ago by BI, Adrien Minne (adrm)
odoo/o-spreadsheet
18.0 #8539
saas-18.2 #8738
saas-18.3 #8739
saas-18.4 #8740
19.0 #8742
saas-19.1 #8743
saas-19.2 #8744
saas-19.3 #8745
master #8746

[FIX] pivot: unused pivot detection

Description:

[FIX] pivot: unused pivot detection with composed formula

If a formula has two pivots (eg. =PIVOT(1) + PIVOT(2)), the
second pivot will not be detected as used.

[FIX] pivot: unused pivot detection with calculated measure

If a pivot has a calculated measure that refers to a second pivot,
the second pivot is not detected as used. This commit fixes that.

Note: the fix does not fix 100% of the issues. A pivot only referenced
in other places (eg. in a CF rule formula) will still not be
detected as used. But checking every other place the pivot can be
referenced is expensive and error-prone. That may be done in master.

Task: 6105894

review checklist

Forward-Port-Of: #8738
Forward-Port-Of: #8539