Repository navigation
[20.0][MIG] report_context: Migration to 20.0 - #1244
Open
yabdelhamed wants to merge 25 commits into
Open
yabdelhamed wants to merge 25 commits into
yabdelhamed wants to merge 25 commits into
Conversation
Co-authored-by: Pierre Verkest <[email protected]>
Currently translated at 100.0% (3 of 3 strings) Translation: reporting-engine-16.0/reporting-engine-16.0-report_context Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_context/it/
Currently translated at 100.0% (3 of 3 strings) Translation: reporting-engine-16.0/reporting-engine-16.0-report_context Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_context/es/
ir.config_parameter replaced get_param/set_param with typed accessors, so the default context is read with get_str. The report route override had no test, one now goes through /report/html and checks the report context reaches the rendering.
2 of 22 tasks
|
The following commit authors need to sign the Contributor License Agreement: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration of
report_contextto 20.0, done with theformat-patchprocedure from the migration guide, so the history and authors are kept.Changes for 20.0:
20.0.1.0.0.ir.config_parameterhas noget_param/set_paramanymore in 20.0, it uses typed accessors._get_contextnow readsreport.default.contextwithget_str, and the tests set it withset_str.test_report_context_controller.py: thereport_routesoverride had no test. It opens/report/html/web.preview_internalreport/<company>and checks the report's context reaches_render_qweb_html.import ... as reportalias dropped (ruff PLC0414), XML headers.Tests, run locally with the CI images
ghcr.io/oca/oca-ci/py3.12-odoo20.0andpy3.12-ocb20.0againstpgvector/pgvector:pg16, usingoca_install_addons,oca_init_test_databaseandoca_run_tests:'ir.config_parameter' object has no attribute 'get_param')._get_context, 3 of the 6 fail.pre-commit run -apasses.Part of #1206.