← Back to Pull requests

[18.0][FIX] payroll: contribution register wizard dates evaluated when the server starts #322

Open
parabol123654 opened this pull request with 22 lines diff across 2 files
View on GitHub
parabol123654 parabol123654 commented on Oct 31, 2026 22:09 UTC
Author

The defaults of date_from and date_to on payslip.lines.contribution.register (PaySlip Lines by Contribution Register wizard) are computed with datetime.now() when the module is imported. If the server was started in October and the report is printed in November, the wizard still proposes October 1st to October 31st.

The fix computes the defaults when the wizard is opened: the first and last day of the current month, using fields.Date.context_today.

The new test opens the wizard inside freeze_time("2030-02-15"). Without the fix it fails with FakeDate(2026, 10, 1) != FakeDate(2030, 2, 1). 19.0 has the same code; I will forward-port it after merge.

Assisted-by: Claude Opus 5.5

Diff: 22 lines (+16 / -6) across 2 files Reviewer: dreispt Review duration: 36464m
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.51) × (1 − Review Confidence (0.68)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.51 · 22 lines diff across 2 files
0.51
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.54 · 1 substantive comment(s)
0.54
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
67%
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.188
Sensitive Paths sensitive_paths
0.051
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
3 items
OCA-git-bot OCA-git-bot commented on Oct 31, 2026 22:09 UTC
Bot

Hi @appstogrow, @nimarosa,
some modules you are maintaining are being modified, check this out!

dreispt dreispt approved these changes on Nov 04, 2026 11:20 UTC
Approved Reviewer

Approved these changes.

Reviewers
Assignees
parabol123654 parabol123654
Labels
risk: low confidence: 67.6% 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: 51.4% (MEDIUM) · Higher = larger blast radius
51.4%
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: 67.6% · Lower = rushed or shallow review
67.6%
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: 16.7% · Safe to merge
16.7%
Repository