← Back to Pull requests

[18.0][IMP] edi_core_oca: add 'cancelled' state and use it in deduplicate #404

Merged
SilvioC2C merged 8 files (42 lines) on Dec 02, 2026 16:50 UTC
View on GitHub
SilvioC2C SilvioC2C commented on Nov 27, 2026 01:21 UTC
Author

No description provided by author.

Diff: 42 lines (+27 / -15) across 8 files Reviewer: ivantodorovich Review duration: 8129m
All Vouch review confidence checks passed
Residual risk 0.04 = Change Risk (0.36) × (1 − Review Confidence (0.87)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 42 lines diff across 8 files
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.83 · 5 substantive comment(s)
0.83
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
87%
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.225
Real PR Conversation Timeline
14 items
OCA-git-bot OCA-git-bot commented on Nov 27, 2026 01:21 UTC
Bot

Hi @simahawk, @etobella,
some modules you are maintaining are being modified, check this out!

SilvioC2C SilvioC2C commented on Nov 27, 2026 01:24 UTC
Author

Back in draft until I test whether the pre-mig script is triggered before or after the ondelete attribute of the Selection field.

simahawk simahawk commented on code on Nov 27, 2026 07:07 UTC
Code Review
edi_core_oca/models/edi_exchange_record.py:1
@@ -91,6 +91,7 @@ class EDIExchangeRecord(models.Model):
             # Common states
             ("new", "New"),
             ("validate_error", "Error on validation"),
+            ("cancel", "Cancelled"),

            ("canceled", "Cancelled"),

simahawk simahawk commented on code on Nov 27, 2026 07:09 UTC
Code Review
edi_exchange_deduplicate_oca/static/description/index.html:1
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
-<title>README.rst</title>
+<title>Edi Exchange Deduplicate OCA</title>

please set SKIP=oca-gen-addon-readme in your shell before commit to avoid such noise

SilvioC2C SilvioC2C commented on Nov 27, 2026 15:19 UTC
Author

@simahawk @etobella the PR is now open for reviews: I checked on a local instance and I do confirm the pre-mig.py script that migrates EDI exchange records' state value "obsolete" to "cancelled" is executed _before_ the ondelete feature of the Selection kicks in.

ivantodorovich ivantodorovich approved these changes on Dec 02, 2026 14:52 UTC
Approved Reviewer

Thanks!

Ricardoalso Ricardoalso commented on code on Dec 02, 2026 15:00 UTC
Code Review
edi_core_oca/models/edi_exchange_record.py:1
@@ -91,6 +91,7 @@ class EDIExchangeRecord(models.Model):
             # Common states
             ("new", "New"),
             ("validate_error", "Error on validation"),
+            ("cancelled", "Cancelled"),
Ricardoalso Ricardoalso commented on Dec 02, 2026 15:08 UTC
Reviewer

The PR name isn't very descriptive (PR description?) 😄

I would use something like :
[18.0][IMP] edi_core_oca: add 'cancelled' state and use it in deduplicate

simahawk simahawk commented on code on Dec 02, 2026 15:39 UTC
Code Review
edi_exchange_deduplicate_oca/migrations/18.0.1.1.0/pre-mig.py:1
@@ -0,0 +1,17 @@
+# Copyright 2026 Camptocamp SA (https://camptocamp.com/)
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

this is not a patch, please increase version as feature. While you do that, pls bump version 0.1.0 for core too because I'll have to merge w/ nobump. Thanks!

simahawk simahawk approved these changes on Dec 02, 2026 16:23 UTC
Approved Reviewer

Approved these changes.

simahawk simahawk commented on Dec 02, 2026 16:24 UTC
Contributor

/ocabot merge nobump

OCA-git-bot OCA-git-bot commented on Dec 02, 2026 16:32 UTC
Bot

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-404-by-simahawk-bump-nobump, awaiting test results.

OCA-git-bot OCA-git-bot commented on Dec 02, 2026 16:50 UTC
Bot

Congratulations, your PR was merged at e021496a5542c1e50addc4787c2103ac64298744. Thanks a lot for contributing to OCA. ❤️

Assignees
SilvioC2C SilvioC2C
Labels
risk: low confidence: 87.4% reviewed
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: 35.8% (MEDIUM) · Higher = larger blast radius
35.8%
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: 87.4% · Lower = rushed or shallow review
87.4%
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: 4.5% · Safe to merge
4.5%