odoo/enterprise#76494

Created by fw-bot
Merged at a8e076416a6725afeced0ae5cce205db578530bb

Statuses:

Linked pull requests
label
odoo-dev:18.0-17.0-composite_report_options_at_creation-hupo-0YUB-fw
head
431385a3107f800a4d959791b229b7b17c39e5a9
merged
10 months ago by Accounting, Hugo Poncelet (hupo)
odoo/odoo odoo/enterprise
17.0 #188476 #74826
saas-17.2 #192368 #76475
saas-17.4 #192390 #76485
18.0 #192404 #76494
saas-18.1 #192414 #76497
saas-18.2
saas-18.3
saas-18.4
19.0
master #192420 #76501

[FW][FIX] account_report: options on composite report export

Steps to reproduce
- Activate developer mode
- Go to Accounting -> Configuration -> Accounting Reports
- Create a composite report with 2 existing reports that
have the "filter_unfold_all" activated, i.e. "Balance Sheet" and "Profit and Loss"
- Create a menu item in the action of the report
- Open the report
- Press the filter "Unfold All"
- Press the "PDF" button

-> Results: the pdf has no line unfolded while they should (the web UI works as expected)

Reason of the issue:
In the dispatch_report_action() function, the get_options() was wrong and unnecessary. This function
is first called on the first section, then called on the composite report with its own options.
This led to use the options of the composite report which does not have the filter_unfold_all field
set to True.

This also handles the case where a composite report has reports A and B, A having the
filter_unfold_all while B doesn't have it. The expected result when printing it is
that only report A has unfolded lines.

task-4317649

Forward-Port-Of: #74826