← Back to Pull requests

[20.0][MIG] bi_sql_editor: Migration to 20.0 #1224

Open
unknown opened this pull request with 224 lines diff across 2 files
View on GitHub
unknown unknown commented on Oct 28, 2026 16:08 UTC
Author

Migration of bi_sql_editor to 20.0, following the OCA migration guide (19.0 history replayed with git format-patch | git am).

Depends on:

  • #1220 (sql_request_abstract), referenced in test-requirements.txt
  • Changes:

  • Version 20.0.1.0.0, removed 19.0 migration script and the 17.0→18.0 credits line

  • Security: ir.model.access.csv converted to ir.access.csv with odoo-bin upgrade_code (19.4-00-ir-access). The former _all lines without group and without permissions are dropped, they grant nothing.

  • Generated models: group permissions are created as ir.access (operation r), the global ir.rule is now a global ir.access restriction (no group, operation crud, domain = domain_force). rule_id now points to ir.access. _drop_model_access only removes the group permissions, so the restriction stays linked.

  • Migration 20.0.1.0.0: pre-migration clears rule_id (former ir.rule ids), post-migration relinks it to the global restriction of each generated model (or creates it).

  • Cron nextcall uses fields.Datetime.now() (UTC) instead of local datetime.now() (ruff DTZ005), map(lambda) replaced by a generator (C417).
  • Not changed: ruff RUF012 (mutable class attributes such as _inherit / selection lists) is still reported by this repo's current .ruff.toml. The OCA template ignores RUF012 for 20.0 since OCA/oca-addons-repo-template#376, so it should disappear once the repo is updated with copier.

    Tested locally on Odoo 20.0 / PostgreSQL 16 with #1220: module installs, 7 tests, 0 failed, 0 errors. Additionally checked manually: view processed to ui_valid creates the group permission and the restriction with the domain, pre/post-migration relink rule_id, button_update_model_access keeps the restriction.

    Assisted-by: Claude Opus 5.5

    Diff: 224 lines (+168 / -56) across 2 files Reviewer: legalsylvain Review duration: 48252m
    All Vouch review confidence checks passed
    Residual risk 0.37 = Change Risk (0.67) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.67 · 224 lines diff across 2 files
    0.67
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    44%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.324
    Sensitive Paths sensitive_paths
    0.067
    Real PR Conversation Timeline
    1 comments
    "Review active on #1224"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 44.7% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 67% (HIGH) · Higher = larger blast radius
    67%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 44.7% · Lower = rushed or shallow review
    44.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 37.1% · Moderate risk
    37.1%