Skip to content

[18.0] MIG report_substitute #1033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 35 commits into
base: 18.0
Choose a base branch
from

Conversation

samirGuesmi
Copy link
Member

This PR is based on PR#948

This PR fixes the report rendering logic to properly handle substitution reports that use a format other than qweb-pdf. If the substituted report has a different report type, the system will now fall back to _render() instead of _render_qweb_pdf(), ensuring correct rendering and avoiding format-related errors.

sbejaoui and others added 30 commits January 15, 2025 13:05
This addon give the possibility to substitute a report action by another based on some criteria.
Currently translated at 100.0% (21 of 21 strings)

Translation: reporting-engine-16.0/reporting-engine-16.0-report_substitute
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_substitute/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: reporting-engine-17.0/reporting-engine-17.0-report_substitute
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-0-report_substitute/
"demo": ["demo/action_report.xml"],
"assets": {
"web.assets_backend": [
"report_substitute/static/src/js/action_manager.js",
Copy link
Member

Choose a reason for hiding this comment

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

@samirGuesmi

Can you please check the file name?

Copy link
Contributor

Choose a reason for hiding this comment

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

done

Copy link
Member

Choose a reason for hiding this comment

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

@sbejaoui
Thank you

Copy link
Contributor

Choose a reason for hiding this comment

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

can you update your review please

Samir GUESMI and others added 2 commits June 16, 2025 14:54
…ect report handler

When the report type differs between the original report and the substitution,
the substitution_handler must return the handler corresponding to the substitution report type

Failing to do so may cause issues, as the report action would be executed using
a handler from a different report type, leading to unexpected behavior or errors
@sbejaoui sbejaoui force-pushed the 18.0-mig-report_substitute branch from bb0c307 to 07c5ccc Compare June 16, 2025 12:54
@amkarthik
Copy link
Member

@sbejaoui Can we get this #1001 here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.