[FIX] pivot: unused pivot detection#8739
Closed
fw-bot wants to merge 2 commits into
Closed
Conversation
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 X-original-commit: 3ae4353
If a formula has two pivots (eg. `=PIVOT(1) + PIVOT(2)`), the second pivot will not be detected as used. Task: 6105894 X-original-commit: b546bf5
Collaborator
Collaborator
Author
|
This PR targets saas-18.3 and is part of the forward-port chain. Further PRs will be created up to master. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
Collaborator
Author
|
@hokolomopo @LucasLefevre the next pull request (#8740) is in conflict. You can merge the chain up to here by saying
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
Contributor
|
@robodoo r+ |
robodoo
pushed a commit
that referenced
this pull request
May 18, 2026
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 X-original-commit: 3ae4353 Part-of: #8739 Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com> Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description:
[FIX] pivot: unused pivot detection with composed formula
If a formula has two pivots (eg.
=PIVOT(1) + PIVOT(2)), thesecond 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