Skip to content

Conversation

@alvaroGC-S73
Copy link
Contributor

@alvaroGC-S73 alvaroGC-S73 commented Nov 18, 2025

PR to Revert: #1057

Error to solve:

RPC_ERROR

Odoo Server Error

Traceback (most recent call last):
File "/opt/odoo/src/oca/reporting-engine/report_xlsx/controllers/main.py", line 65, in report_download
response = self.report_routes(

..........

File "/opt/odoo/src/oca/account-financial-reporting/account_financial_report/report/abstract_report.py", line 167, in _get_report_values
wizard = self.env[data["wizard_name"]].browse(data["wizard_id"])
KeyError: 'wizard_name'

The core issue is that the new JavaScript code introduced a bug: while attempting to fix context propagation for XLSX reports, it broke the standard method for passing wizard data (wizard_name, wizard_id). The old JS correctly serialized the essential action.data into the URL as an option query parameter, which the OCA backend modules rely on to find the wizard instance and generate the report.

@alvaroGC-S73 alvaroGC-S73 changed the title [18.0][FIX] report_xslx [18.0][FIX] report_xlsx Nov 18, 2025
Copy link

@micheledic micheledic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
This bug blocks this PR OCA/account-financial-reporting#1413

@pedrobaeza
Copy link
Member

But reverting this will undo the feature. This should instead fix the root cause, isn't it?

@micheledic
Copy link

But reverting this will undo the feature. This should instead fix the root cause, isn't it?

I tried this PR and the xls report works , imho can be merged to fix the issue

@pedrobaeza
Copy link
Member

Yeah, but the reason why it was put initially will come to not be resolved, so that's why I say that this should fix the problem without losing the feature.

@micheledic
Copy link

micheledic commented Nov 21, 2025

@JordiBForgeFlow
Copy link
Member

In my opinion this PR should be merged ASAP because it fixes a breaking error. The feature that was introduced in d931ea7 was not fixing an error

@JordiBForgeFlow
Copy link
Member

@alvaroGC-S73 i just checked and it may be enough to remove those line and the xlsx report works https://github.com/OCA/reporting-engine/blob/18.0/report_xlsx/static/src/js/report/action_manager_report.esm.js#L16-18 https://github.com/OCA/reporting-engine/blob/18.0/report_xlsx/static/src/js/report/action_manager_report.esm.js#L25-27

Or we have to push a PR to odoo core because the issue is caused on this line: https://github.com/odoo/odoo/blob/70404624d7ea6f971182cbe4f4fe8fc064d2afd8/addons/web/controllers/report.py#L118

Of docids is passed, the date is not passed correctly

I agree that the fix proposed here works, at least when we try to export the financial reports. But not sure if it breaks something else.

@pedrobaeza
Copy link
Member

OK, let's revert it and let @DucTruongKomit to propose an alternative solution to his problem.

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-1095-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 4ecc31f into OCA:18.0 Nov 24, 2025
5 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at a602ffd. Thanks a lot for contributing to OCA. ❤️

@micheledic
Copy link

I created fwport #1099 @pedrobaeza

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants