[FIX] [16.0] defuse possible endless loop in groupby rendering #1272
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 of the issue/feature this PR addresses:
The default Odoo Journal Items view (account.move.line tree view) contains a component to add a button next to the partner name on the grouping header. When one of the custom modules defines a field called "partner_id" on the "res.partner" model, an endless loop occurs, because the groupby tag is handled again in the nested view postprocessing call and the condition to not handle the groupby tag in the nested call is flawed.
The real solution would probably be to render only the child items underneath the groupby tag, but this solution works also.
Current behavior before PR:
If your custom module defines 'partner_id' field on 'res.partner', the default Journal Items tree view in Odoo breaks. This is just one of the examples that can go wrong, there are sure to be others.
Desired behavior after PR is merged:
Nested groupby calls are broken off and this bug does not happen anymore.
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr