Skip to content

[20.0][MIG] report_context: Migration to 20.0 - #1244

Open
yabdelhamed wants to merge 25 commits into
OCA:20.0from
yabdelhamed:20.0-mig-report_context
Open

yabdelhamed wants to merge 25 commits into
OCA:20.0from
yabdelhamed:20.0-mig-report_context

Conversation

@yabdelhamed

Copy link
Copy Markdown

Migration of report_context to 20.0, done with the format-patch procedure from the migration guide, so the history and authors are kept.

Changes for 20.0:

  • Version bumped to 20.0.1.0.0.
  • ir.config_parameter has no get_param/set_param anymore in 20.0, it uses typed accessors. _get_context now reads report.default.context with get_str, and the tests set it with set_str.
  • New test_report_context_controller.py: the report_routes override had no test. It opens /report/html/web.preview_internalreport/<company> and checks the report's context reaches _render_qweb_html.
  • pre-commit fixes for 20.0: one-line manifest summary (pylint C8120), import ... as report alias dropped (ruff PLC0414), XML headers.

Tests, run locally with the CI images ghcr.io/oca/oca-ci/py3.12-odoo20.0 and py3.12-ocb20.0 against pgvector/pgvector:pg16, using oca_install_addons, oca_init_test_database and oca_run_tests:

  • With only the version bumped: 0 failed, 5 error(s) of 5 tests ('ir.config_parameter' object has no attribute 'get_param').
  • Odoo: 0 failed, 0 error(s) of 6 tests.
  • OCB: 0 failed, 0 error(s) of 6 tests.
  • With the controller passing the original context through unchanged, the new controller test fails. With the report's own context dropped in _get_context, 3 of the 6 fail.

pre-commit run -a passes.

Part of #1206.

Jaime Arroyo and others added 25 commits November 21, 2026 03:21
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.
@yabdelhamed yabdelhamed mentioned this pull request Nov 21, 2026
2 of 22 tasks
@oca-cla-bot

oca-cla-bot Bot commented Nov 21, 2026

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants