Skip to content

[20.0][MIG] report_qweb_field_option: Migration to 20.0 - #1243

Open
yabdelhamed wants to merge 24 commits into
OCA:20.0from
yabdelhamed:20.0-mig-report_qweb_field_option
Open

yabdelhamed wants to merge 24 commits into
OCA:20.0from
yabdelhamed:20.0-mig-report_qweb_field_option

Conversation

@yabdelhamed

Copy link
Copy Markdown

Migration of report_qweb_field_option 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.model.access and ir.rule are merged into ir.access in 20.0, so the module failed to install (KeyError: 'ir.model.access'). The four access rows and the multi-company rule now live in security/ir.access.csv, the rule as a row without a group, like core does.
  • odoo.tools.safe_eval no longer exposes pytz. timezone in the domain eval context is now ZoneInfo, as in ir.actions _get_eval_context.
  • The two except Exception fallbacks (domain evaluation and option parsing) are kept on purpose so a bad option doesn't break report rendering, marked noqa: BLE001 for ruff on 20.0.
  • New test_access_rights: an internal user can read options, can't write them and doesn't see another company's options, since the access file was rewritten.

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: install fails on ir.model.access. With the access file converted but pytz still used: 1 error of 5 tests.
  • Odoo: 0 failed, 0 error(s) of 6 tests.
  • OCB: 0 failed, 0 error(s) of 6 tests.
  • Removing the multi-company row, or giving base.group_user write access, makes test_access_rights fail. Disabling the _get_field override makes 4 of the 6 fail.

pre-commit run -a passes.

Part of #1206.

AungKoKoLin1997 and others added 24 commits November 21, 2026 03:10
Currently translated at 100.0% (26 of 26 strings)

Translation: reporting-engine-16.0/reporting-engine-16.0-report_qweb_field_option
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_qweb_field_option/it/
Currently translated at 100.0% (25 of 25 strings)

Translation: reporting-engine-18.0/reporting-engine-18.0-report_qweb_field_option
Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_qweb_field_option/nl_NL/
…ng the decimal places

Add domain field in report config for better control of decimal places.
ir.model.access and ir.rule are merged into ir.access, so the access
rights and the multi-company rule move to security/ir.access.csv, with a
test covering them. safe_eval no longer exposes pytz, timezone now uses
ZoneInfo like the server actions do.
@yabdelhamed yabdelhamed mentioned this pull request Nov 21, 2026
2 of 22 tasks
@OCA-git-bot OCA-git-bot added mod:report_qweb_field_option Module report_qweb_field_option series:20.0 labels Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:report_qweb_field_option Module report_qweb_field_option series:20.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants