← Back to Pull requests

[19.0][MIG] l10n_es_aeat: Migration to 19.0 #4624

Closed
unknown closed this pull request without merging on Mar 12, 2026 14:24 UTC
View on GitHub
unknown unknown commented on Nov 26, 2025 10:58 UTC
Author

Refactoring & Modernization


ORM Commands: Replaced legacy "magic tuples" (e.g., [(0, 0, ...)](cci:1://file:///home/pablo/Code/odoo/19.0/oca/l10n-spain/l10n_es_aeat/wizard/export_to_boe.py:206:8-209:47), [(4, ...)](cci:1://file:///home/pablo/Code/odoo/19.0/oca/l10n-spain/l10n_es_aeat/wizard/export_to_boe.py:206:8-209:47), [(6, 0, ...)](cci:1://file:///home/pablo/Code/odoo/19.0/oca/l10n-spain/l10n_es_aeat/wizard/export_to_boe.py:206:8-209:47)) with the Command namespace methods (Command.create, Command.link, Command.set) in both Python code and XML [eval](cci:1://file:///home/pablo/Code/odoo/19.0/oca/l10n-spain/l10n_es_aeat/wizard/export_to_boe.py:195:8-204:13) attributes.
Domain API: Fixed and standardized the usage of Domain.AND and Domain.OR to correctly accept lists of domains.
String Formatting: Migrated various string formatting operations to use f-strings for better readability and performance.

Odoo 19.0 / Python Migration


name_get Removal: Replaced name_get with [_compute_display_name](cci:1://file:///home/pablo/Code/odoo/19.0/oca/l10n-spain/l10n_es_aeat/models/l10n_es_aeat_map_tax.py:52:4-62:19) in [l10n_es_aeat_map_tax.py](cci:7://file:///home/pablo/Code/odoo/19.0/oca/l10n-spain/l10n_es_aeat/models/l10n_es_aeat_map_tax.py:0:0-0:0).
Menu Items: Renamed groups_id to group_ids and ensured fully qualified group names in [aeat_menuitem.xml](cci:7://file:///home/pablo/Code/odoo/19.0/oca/l10n-spain/l10n_es_aeat/views/aeat_menuitem.xml:0:0-0:0).

Test Framework Updates


Model Registration: Replaced the external odoo_test_helper.FakeModelLoader with Odoo's native odoo.orm.model_classes.add_to_registry and addClassCleanup in [test_l10n_es_aeat_report.py](cci:7://file:///home/pablo/Code/odoo/19.0/oca/l10n-spain/l10n_es_aeat/tests/test_l10n_es_aeat_report.py:0:0-0:0).

Structure & Fixes


File Movement: Moved aeat_soap.py from models to [wizard](cci:1://file:///home/pablo/Code/odoo/19.0/oca/l10n-spain/l10n_es_aeat/models/aeat_certificate.py:31:4-40:9).
Defaults: Updated default value definitions in [l10n_es_aeat_report.py](cci:7://file:///home/pablo/Code/odoo/19.0/oca/l10n-spain/l10n_es_aeat/models/l10n_es_aeat_report.py:0:0-0:0) to use lambda functions, ensuring proper context evaluation.
  • Export Logic: Refactored [export_to_boe.py](cci:7://file:///home/pablo/Code/odoo/19.0/oca/l10n-spain/l10n_es_aeat/wizard/export_to_boe.py:0:0-0:0) formatting logic for better precision
  • Diff: 320 lines (+240 / -80) across 4 files Reviewer: loida-vm Review duration: 152845m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.65) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.65 · 320 lines diff across 4 files
    0.65
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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
    Diff Size diff_size
    0.345
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.065
    Real PR Conversation Timeline
    1 comments
    "Review active on #4624"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 65.1% (HIGH) · Higher = larger blast radius
    65.1%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 25.7% · Safe to merge
    25.7%
    Repository