← Back to Pull requests

[20.0][MIG] mail_notification_custom_subject: Migration to 20.0 #338

Open
unknown opened this pull request with 184 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 07, 2026 14:28 UTC
Author

Migration of mail_notification_custom_subject to 20.0.

Changes:

  • Version bumped to 20.0.1.0.0; the 19.0 version isn't installable on 20.0.

  • ir.model.access.csv replaced by ir.access.csv, generated with 19.4-00-ir-access.py. Rights are unchanged: r for base.group_user, crud for base.group_system.

  • _test_user_groups = None on the test class, as the migration guide describes: BaseCommon now rebinds recordsets to a plain internal user, which undoes the test's with_user(admin).

  • # noqa: BLE001 on the existing except Exception, flagged by the ruff version pinned on 20.0 (see OCA/oca-addons-repo-template#372). Behaviour is unchanged.
  • How to test on Runboat:
    1. In debug mode, make sure the admin user has an email address.
    2. Under Settings > Technical > Email > Subject Replacement Templates, create a template for Contact, subtype "Messages", position Replace, with a subject such as Manual check for {{object.name}}.
    3. Post a message on a contact with a follower.
    4. The rendered subject shows in the chatter and on the email in MailHog.

    I did this on this PR's Runboat build. Locally, on Odoo 20.0 c8a62e5f0 with PostgreSQL 16 and 17, all 8 tests pass, checklog-odoo and pre-commit are clean, and the subject shows on the outgoing mail.mail.

    <img width="1470" height="284" alt="Screenshot 2026-11-07 at 11 22 33 PM" src="https://github.com/user-attachments/assets/11599e18-ca4d-4263-ab7d-dbddd4f94445" />

    Diff: 184 lines (+138 / -46) across 2 files Reviewer: adasatorres-tecnativa Review duration: 33843m
    All Vouch review confidence checks passed
    Residual risk 0.33 = Change Risk (0.59) × (1 − Review Confidence (0.44)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.59 · 184 lines diff across 2 files
    0.59
    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.312
    Sensitive Paths sensitive_paths
    0.059
    Real PR Conversation Timeline
    1 comments
    "Review active on #338"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 44.2% 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: 58.9% (MEDIUM) · Higher = larger blast radius
    58.9%
    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.2% · Lower = rushed or shallow review
    44.2%
    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: 32.9% · Safe to merge
    32.9%
    Repository