Skip to content

[20.0][MIG] mis_builder_budget: Migration to 20.0 - #853

Open
cav-adhoc wants to merge 3 commits into
OCA:20.0from
adhoc-dev:20.0-t-76673-cav
Open

cav-adhoc wants to merge 3 commits into
OCA:20.0from
adhoc-dev:20.0-t-76673-cav

Conversation

@cav-adhoc

Copy link
Copy Markdown

Migration of mis_builder_budget from 19.0 to 20.0, as per the migration guide.

Part of #843. Depends on #842 (mis_builder), referenced from test-requirements.txt in a [DON'T MERGE] commit, so the "Detect unreleased dependencies" check fails on purpose. That commit must be dropped once #842 is merged.

Changes:

  • Bump version to 20.0.1.0.0 and make the module installable.
  • Migrate the four security/*.xml files (ir.model.access and global ir.rule records) to security/ir.access.csv with upgrade_code 19.4-00-ir-access. The xmlids are kept: the multi-company rules become restrictions without group.
  • Add migrations/20.0.1.0.0/pre-migration.py, the same as in [20.0][MIG] mis_builder: Migration to 20.0 #842 for mis_builder: it drops the xmlids still pointing to ir.model.access / ir.rule, so that ir.access.csv can load. Without it, a database where those xmlids keep the legacy model fails on update with found record of different model ir.model.access. Tested on a database seeded that way: it fails without the script and updates with it. Not tested yet on a database upgraded from 19.0.
  • copy=True on mis.budget.by.account.item.name: since 20.0, Char fields named name are copied with a " (copy)" suffix unless they set copy, so the labels of the items were changed when duplicating a budget. test_copy now checks the labels.
  • env.clear() is deprecated in 20.0: replaced by env.transaction.clear() in the tests.
  • Stat button icon fa-bars -> menu (Material Symbols).
  • New ruff rules: dict() calls to literals (C408) and nested if (SIM102).
  • No ClassVar annotations or noqa are added for RUF012 on _inherit. The rule is ignored for Odoo >= 20.0 in the repository template (OCA/oca-addons-repo-template#376, proposed for this repository in Update dependency https://github.com/OCA/oca-addons-repo-template to v1.48 (20.0) #852). Until it is merged, the ruff pre-commit hook reports RUF012 on this module.
  • .pre-commit-config.yaml: mis_builder_budget leaves the non-installable list; mis_builder and mis_builder_demo are added, as they are still not installable on 20.0.

The 16 tests pass on a 20.0 database with mis_builder from #842.

@oca-cla-bot

oca-cla-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

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

Labels

mod:mis_builder_budget Module mis_builder_budget series:20.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants