odoo/enterprise#76501

Created by fw-bot
Merged at 6a7e79a4ec950cface94179d088d52120f6d0598

Statuses:

Linked pull requests
label
odoo-dev:master-17.0-composite_report_options_at_creation-hupo-eWYE-fw
head
f4d9fd2249771d75f12ca20f2ee14a63b89c3bae
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