odoo/enterprise#76475

Created by fw-bot
Merged at 55e18bd016301d81bceeb87f35e69f1a8929c51f

Statuses:

Linked pull requests
label
odoo-dev:saas-17.2-17.0-composite_report_options_at_creation-hupo-n78c-fw
head
7d3d02249b9d80f501bb0304b401808c89b812e9
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